• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejbCreate() in stateless  RSS feed

 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ejbcreate() method in a stateless bean cannot have any arguments. So if I wish to do a credit card validation, how do I use it? I dont think stateful needs to be used for credit card validations because you dont need to maintain the state once the validation returns 'yes' or 'no'
Regards,
PK
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prakash
You can put a business method- validateCC(), in the session bean that accepts the Credit card information object as argument and that would solve your issue , right?
Thanks
Maulin
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prakash,
Normally there are 2 ways of validating Credit cards.
1. Validations are done using JavaScript to check the authenticity of the card no and the expiration date.
2. Actual balance available for the credit card using 3 party tool for sending the request to the Payment Gateway. The method could be the business method defined by Maulin other than the ejbCreate one.
Hope this is clear.
Seetesh
 
sathyamangalam guruprasad
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!
you can do the javascript validations for purely front-end checkings such as empty fields,number of digits , etc.
as far as business logic is concerned, you can have a business method as suggested by maulin earlier to check for the presence of card number and other details.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!