Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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.
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
The trailboss has a kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic