This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How I can make multiple instances of a SEAM component?

 
Tor Rodri
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic