This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Invoking new()  on a bean class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Invoking new()  on a bean class?" Watch "Invoking new()  on a bean class?" New topic
Author

Invoking new() on a bean class?

Senthil Kumar
Ranch Hand

Joined: Mar 13, 2006
Posts: 264
Is it possible to instantiate a bean class inside an another bean.If the container allows us to do that, do we still get those services provided by the container.


when you really want something, all the universe always conspires in your favour.<br /> <br />SCJP1.5-77%<br />SCWCD-89%
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

You mean without calling create ? If that's what you mean, how would you instanciate an entity bean as it is abstract ?


[My Blog]
All roads lead to JavaRanch
Senthil Kumar
Ranch Hand

Joined: Mar 13, 2006
Posts: 264
ok how about session beans.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

If you'd instanciate one, it would just be like a simple java class. It's not maintained by the container any more. So no lifecycle event, no management...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Invoking new() on a bean class?