This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes How I can make multiple instances of a SEAM component? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How I can make multiple instances of a SEAM component?" Watch "How I can make multiple instances of a SEAM component?" New topic
Author

How I can make multiple instances of a SEAM component?

Tor Rodri
Greenhorn

Joined: May 16, 2010
Posts: 1
Hi everyone,

I've been having troubles making multiples instances of a Seam Component,

I've tried to do:


... // previous code

MyClass object1 = Component.getInstance("myClass",true);
MyClass object2 = Component.getInstance("myClass",true);
MyClass object3 = Component.getInstance("myClass",true);

... //more code


But I've been readed that the getInstance() method uses the Singleton pattern so object1, object2 and object3 refers to the same instance :S


I need three different instances of that component, could you help me please?

Thanks.


Sorry about my english but I don't speak english.
 
 
subject: How I can make multiple instances of a SEAM component?
 
Similar Threads
scjp GC
Is this explanation correct?
How to search for nested objects?
store more than one object into a file [ObjectOutputStream]
jaxb marshall java to xml