The point is that all the producers must be defined in the same class.
Are the test sources online somewhere? I've looked at our sources and they seem 
to be fine. 
Please note that Weld doesn't seem to check all Serialization criterias for 
@Inject method members and @Inject constructors which are required by the spec. 
We got a similar issue reported a few weeks ago and I created CDI-140 to fix 
that in the spec. We will go on and relax/refine those checks soon.

LieGrue,
strub

--- On Mon, 7/25/11, John D. Ament <[email protected]> wrote:

From: John D. Ament <[email protected]>
Subject: Re: Greetings all
To: [email protected]
Date: Monday, July 25, 2011, 2:15 AM

strub-

Here's the stacktrace

https://gist.github.com/1103419

As far as the disposer, I doubt that's the issue here.  You can define multiple 
producers of the same type within a single class, then create a disposer that 
handles them all in a single disposer.  That's what the @Any does here.


Gerhard

If your GSOC person has done the work, we should be able to get them in to 
arquillian.


John

On Sun, Jul 24, 2011 at 6:05 PM, Mark Struberg <[email protected]> wrote:

Hi John!



Welcome to OWB, and thanks for reporting this issues!



I think for the first Serialization issue I need the stactrace.



Regarding the 2nd issue: can yo please check your @Disposes method?

public void closeSession(@Disposes @Any Session s) throws JMSException

@Any seems wrong, because the spec states that the @Disposes must be in the 
same class which contains the producer afaik. So you should use @Default if any.



Do you haven an example for us so we can re-test this?

Should all work with owb-1.1.0 imo.



LieGrue,

strub





--- On Sun, 7/24/11, John D. Ament <[email protected]> wrote:



From: John D. Ament <[email protected]>

Subject: Greetings all

To: [email protected]

Date: Sunday, July 24, 2011, 12:11 PM



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












Reply via email to