Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

regardin ejbCreate()  RSS feed

 
srinivas k
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i have a doubt, no where in the enterprisebean/entity bean/session bean interface we find ejbCreate() method declaration even then the implementation of ejbcreate() is a must in the bean class why is it so?and where is this ejbcreate method present?
ok then thanks in advance
 
Malu Sivasankar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ejbCreate() methods are similar to the constructors written by the Enterprise bean developer.
According to EJB 2.1 Specification, the session bean class must implement one or more ejbCreate() methods that corresponds to the create() method specified in the home interface. The method signature of ejbCreate() must follow rules such as
Method must be declared as public
Method must not be declared as final or static and so on�
More information can be obtained from EJB 2.1 Specification.
Thanks,
Malu
 
Nitzan Levi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
there's two ways that standarts can be made
1. using framworks
2. by contacts
in java pure java the way is with framworks using interfaces ,abstarcts classes and other utilities.
in j2ee it's with contacts(the specifications).
because j2ee is a java oriented parts of the standarts are using java style(interfaces) and parts are with contacts.
the ejbCreate methods are stadarts that uses contracts , you won't find this method in any interface , but the development tool(on asembly time) in validation time will check if you defined the ejbCreate methods(and the postCreate also). if you'll think about it there's no way you can define ejbCreate with interface because it's the bean provider decision witch "constractors" he want's to write !!
hope it helps you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!