• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

ejbCreate() in stateless

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic