You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@openwebbeans.apache.org by "John D. Ament" <jo...@gmail.com> on 2011/07/24 14:11:17 UTC

Greetings all

Hi all

I'm new to OpenWebBeans, but not CDI (have been working with Weld for a year
now).  I am working on CDI support for JMS and ran into an issue trying to
make tests run on openwebbeans + activemq.  It looks like I"m working with
OWB 1.0, so this might be fixed already.  I think I'm stuck with whatever
Arquillian supports for right now.

When working with Weld + HornetQ, I am able to inject session instances to
dependent beans when the session is dependent.  The session implementation
is not serializable.  When running tests against OWB + activemq, I end up
with this failure:

Caused by: javax.enterprise.inject.IllegalProductException: If a producer
method or field of scope @Dependent returns an serializable object for
injection into an injection point Field Injection Point, field name :
session, Bean Owner : [Name:null,WebBeans Type:MANAGED,API
Types:[java.lang.Object,org.jboss.seam.jms.MessageManager,java.io.Serializable,org.jboss.seam.jms.MessageManagerImpl],Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]]
that requires a passivation capable dependency

In all cases, my components are Dependent, nothing is SessionScoped.

Another issue I ran into, the following two beans apparently conflict with
one another:

https://github.com/johnament/seam-jms/blob/develop/impl/src/main/java/org/jboss/seam/jms/impl/inject/SessionProducer.java

https://github.com/johnament/seam-jms/blob/develop/api/src/main/java/org/jboss/seam/jms/inject/JmsSessionProducer.java

One is dependent the other is @JmsDefault.  Only one should satisfy @Inject
Session session, but fails stating that both satisfy it.

Thoughts on this?

- John
Seam JMS Module Lead
http://bit.ly/ihateseamjms

Re: Greetings all

Posted by Gerhard Petracek <ge...@gmail.com>.
hi john,

welcome @ owb!

the spi changes in v1.1.0+ aren't that huge. since arquillian should upgrade
sooner or later, it would be more useful to do that instead of thinking
about old (?) issues (+ i think it's pretty easy for aslak).
furthermore, at myfaces we have a gsoc project which is based on arquillian.
i'll ask the student if he already did the upgrade.

regards,
gerhard

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2011/7/24 John D. Ament <jo...@gmail.com>

> Hi all
>
> I'm new to OpenWebBeans, but not CDI (have been working with Weld for a
> year now).  I am working on CDI support for JMS and ran into an issue trying
> to make tests run on openwebbeans + activemq.  It looks like I"m working
> with OWB 1.0, so this might be fixed already.  I think I'm stuck with
> whatever Arquillian supports for right now.
>
> When working with Weld + HornetQ, I am able to inject session instances to
> dependent beans when the session is dependent.  The session implementation
> is not serializable.  When running tests against OWB + activemq, I end up
> with this failure:
>
> Caused by: javax.enterprise.inject.IllegalProductException: If a producer
> method or field of scope @Dependent returns an serializable object for
> injection into an injection point Field Injection Point, field name :
> session, Bean Owner : [Name:null,WebBeans Type:MANAGED,API
> Types:[java.lang.Object,org.jboss.seam.jms.MessageManager,java.io.Serializable,org.jboss.seam.jms.MessageManagerImpl],Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]]
> that requires a passivation capable dependency
>
> In all cases, my components are Dependent, nothing is SessionScoped.
>
> Another issue I ran into, the following two beans apparently conflict with
> one another:
>
>
> https://github.com/johnament/seam-jms/blob/develop/impl/src/main/java/org/jboss/seam/jms/impl/inject/SessionProducer.java
>
>
> https://github.com/johnament/seam-jms/blob/develop/api/src/main/java/org/jboss/seam/jms/inject/JmsSessionProducer.java
>
> One is dependent the other is @JmsDefault.  Only one should satisfy @Inject
> Session session, but fails stating that both satisfy it.
>
> Thoughts on this?
>
> - John
> Seam JMS Module Lead
> http://bit.ly/ihateseamjms
>
>