dev@glassfish.java.net

CDI BeanManager.addBean() question

From: Lee Chuk Munn <chuk-munn.lee_at_oracle.com>
Date: Wed, 22 Jun 2011 17:12:05 +0800

Hi

I have a class org.xmpp.packet.Message that is *NOT* bundled as part of
my deployment WAR. The Message class is installed on the platform viz.
the JAR that contains the class is in glassfish/modules directory.

In my CDI portable extension, I'm creating a bean

public class MessageBean implements Bean<Message> {

and I'm registering this in the AfterBeanDiscovery phase. I can't seem
to register or enable this bean. There are no exceptions.

I have another bean

public class ThreadIDBean implements Bean<ThreadID> {

and ThreadID is part of the deployment WAR. This bean is register and
enabled by the BeanManager.

Is there a restriction on the registration of the beans?

Any pointers appreciated.

Thanks

Regards
Chuk
-- 
Never memorize what you can look up in books.
	-- Albert Einstein