[jboss-user] [JBoss Seam] - Re: Injection woes
petemuir
do-not-reply at jboss.com
Wed Aug 16 11:17:29 EDT 2006
| @Name("myComponent")
| public class MyComponentManager {
|
| private MyComponent myComponent;
|
| public MyComponentManager() {
| myComponent = MyComponentFactory.getInstance();
| }
|
| @Unwrap
| public MyComponent getMyComponent() {
| return myComponent;
| }
|
| ...
| @In(create=true)
| private MyComponent myComponent;
| ...
|
Where MyComponent is a third-party non-seam-managed interface (e.g. something from your reporting library) and MyComponentFactory retrives an implementation for MyComponent.
HTH
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965516#3965516
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965516
More information about the jboss-user
mailing list