• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How I can make multiple instances of a SEAM component?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic