• 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
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Home interface of Stateless Session Bean

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
We all know that in the Home interface of Stateless Session Bean, we cannot have a create method with arguments. That means the method signature must be:

However, can we have this? :

It seems to me it makes perfect sense to have this, however, according to what I see in the spec, it has not mentioned anything about create<METHOD> in Stateless Session Bean. That only happens on Stateful Session Bean.
Please confirm my findings.
Thanks in advance,
John
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


// This is proper for Stateless Session Beanpublic StatelessSessionBean create () throws CreateException, RemoteException;// Is this proper for Stateless Session Bean?public StatelessSessionBean createSomething () throws CreateException, RemoteException;


This is not legal as per spec., I think you should read 7.10.6 and 7.10.8 on page 97 and 98 in EJB Spec. So, You can write only one create method with no argument in stateless bean home interface.
Regards,
[ December 13, 2003: Message edited by: Nauman Khan ]
 
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually it did mention. And a lot of times. Only one parameterless create() in stateless beans. If you see another create<XXX> it does mean this bean can be only stateful. At least by the book.
The trouble learning EJB and trouble using it... There are a lot of things nobody will complain about. Compilers... those don't care about your beans, a lot of mistakes might be passed through deployment tools too. You will be able even to make bad things running on some containers.
 
John Liang
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Thanks guys. I got it in the spec. I have also found it in HFEJB on page 125, "Rules for the home interface". I miss that whole thing ... ...
Thanks for your help,
John
[ December 14, 2003: Message edited by: John Liang ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic