[jboss-user] [JBoss Seam] - Re: Entity withiout Injection --- How do construct a efficie

matt.drees do-not-reply at jboss.com
Thu Sep 27 14:12:19 EDT 2007


For my stuff, if I need to access Seam components in an entity, I usually do something like

  | Repository.instance();
  | 

My static instance methods look something like this:

  | static instance() {
  |    return InstanceManager.instance().getInstance(Repository.class);
  | }
  | 

And then InstanceManager either looks it up from Seam, or if Seam isn't available (simple unit tests), keeps a pool of Singletons.

Still kinda kludgy, but it's practical.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089440#4089440

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089440



More information about the jboss-user mailing list