-
1. Re: Newer release of extension package
genman Jun 9, 2009 8:16 PM (in response to genman)Specifically the
SE
package, also theWicket
package where the BeanManager interface changed. -
2. Re: Newer release of extension package
pmuir Jun 11, 2009 11:43 PM (in response to genman)They will be updated, but as you can see, there is a lot of work to do across the whole code base.
Putting a patch in JIRA will speed it up :-)
-
3. Re: Newer release of extension package
genman Jun 13, 2009 12:55 AM (in response to genman)Yeah, was going to give it a shot, but looks like the RI trunk code is messed up at the moment. Well, I'll see what I can do when trunk stabilizes.
I do have a question, what should one do instead of call the old Manager.getInstanceByType() ? Looks like this is the equivalent:
Set<Bean<?>> beans = manager.getBeans(Foo.class); foo = (Foo) manager.getReference(beans.iterator().next(), Foo.class);
Not quite as elegant as the
getInstanceByType
method... Still, it's an SPI method so I understand why it's not as friendly. But for unit testing, I'm wondering if there is a suggested approach that would work well for getting references to managed Web Beans. -
4. Re: Newer release of extension package
wschwendt Jun 13, 2009 9:14 PM (in response to genman)
Elias Ross wrote on Jun 13, 2009 00:55:
I do have a question, what should one do instead of call the old Manager.getInstanceByType() ?Thanks for raising this issue. I have exactly the same question.
The Javadocs for org.jboss.webbeans.BeanManagerImpl currently state only that getInstanceByType() is deprecated (SVN Rev. 2828), but I haven't found any explanation what we should call now instead. What is the recommended way to replace old calls of Manager.getInstanceByType()?.
-
5. Re: Newer release of extension package
cpopetz Jun 13, 2009 10:35 PM (in response to genman)
Wolfgang Schwendt wrote on Jun 13, 2009 21:14:
Elias Ross wrote on Jun 13, 2009 00:55:
I do have a question, what should one do instead of call the old Manager.getInstanceByType() ?
Thanks for raising this issue. I have exactly the same question.
The Javadocs for org.jboss.webbeans.BeanManagerImpl currently state only that getInstanceByType() is deprecated (SVN Rev. 2828), but I haven't found any explanation what we should call now instead. What is the recommended way to replace old calls of Manager.getInstanceByType()?.manager.getReference( manager.getBeans(beanType,bindings).iterator().next(),beanType);
(Assuming you know you only have one bean of the given type, that is.)
-
6. Re: Newer release of extension package
pmuir Jun 15, 2009 6:06 PM (in response to genman)
Elias Ross wrote on Jun 13, 2009 00:55:
But for unit testing, I'm wondering if there is a suggested approach that would work well for getting references to managed Web Beans.For now, I would do as suggested in this thread. Eventually we will expose something similar to SeamTest that provides a convenience method like getInstanceByType() - the only reason we aren't exposing the existing test support classes is that we need to check over their API :-)