Re: TomEE 7.0.1 JMS/MDB

2016-09-20 Thread Romain Manni-Bucau
FYI https://issues.apache.org/jira/browse/TOMEE-1938 and
https://issues.apache.org/jira/browse/TOMEE-1936 have been pushed


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Wordpress Blog
 | Github  |
LinkedIn  | Tomitriber
 | JavaEE Factory


2016-09-15 9:01 GMT+02:00 Romain Manni-Bucau :

> Le 15 sept. 2016 04:23, "vnalla"  a écrit :
> >
> > Hi
> >
> >
> > 1) message.getBody(String.class) is not working - I have to change the
> code
> > for both the client and MDB to  pass TextMessage object and cast message
> to
> > TextMessage object and get the text using getText() method. Is there any
> > special setting required? - I used javaee7 jms-xa example
>
> Yes, you can assign me a jira, will fix it for 7.0.2
>
> >
> > 2) JMS 2.0 configuration is not working - not sure what I am doing
> wrong, I
> > tried to change the names a bit. This example also taken from javaee7 -
> > jms-batch example.
> >
>
> If not working renaming the app "foo.war" same comment
>
> > @JMSDestinationDefinition(
> > name = Resources.TOPIC,
> > resourceAdapter = "jmsra",
> > interfaceName = "javax.jms.Topic",
> > destinationName = "batch.topic",
> > description = "Batch processing topic")
> > @JMSConnectionFactoryDefinition( // <1> WildFly appears to require user
> and
> > password to be set for connection factories
> > name = Resources.CONNECTION_FACTORY,
> > resourceAdapter = "jmsra",
> > clientId = "batchJob", // <2> It is not allowed to call
> +setClientId+ on
> > +Connection+ or +JMSContext+ in Java EE container.
> > description = "Connection factory with clientId of the durable
> > subscription")
> > public class Resources {
> > public static final String SUBSCRIPTION = "BatchJob"; // <3> Durable
> > consumer is uniquely identified with its +clientId+ and
> +subscriptionName+.
> > //public static final String TOPIC = "java:app/batch/topic";
> > public static final String TOPIC = "batch_topic";
> > public static final String CONNECTION_FACTORY = "batch_factory";
> > }
> >
> > throwing exceptions:
> >
> > 14-Sep-2016 21:45:18.356 INFO [http-nio-0.0.0.0-8080-exec-3]
> > org.apache.openejb.assembler.classic.Assembler.startEjbs Created
> > Ejb(deployment-id=ResultCollector, ejb-name=ResultCollector,
> > container=Default Singleton Container)^M
> > 14-Sep-2016 21:45:18.357 INFO [http-nio-0.0.0.0-8080-exec-3]
> > org.apache.openejb.assembler.classic.Assembler.startEjbs Created
> > Ejb(deployment-id=SubscriptionCreator, ejb-name=SubscriptionCreator,
> > container=Default Singleton Container)^M
> > 14-Sep-2016 21:45:18.357 INFO [http-nio-0.0.0.0-8080-exec-3]
> > org.apache.openejb.assembler.classic.Assembler.startEjbs Started
> > Ejb(deployment-id=ResultCollector, ejb-name=ResultCollector,
> > container=Default Singleton Container)^M
> > 14-Sep-2016 21:45:18.362 WARNING [http-nio-0.0.0.0-8080-exec-3]
> > org.apache.openejb.InjectionProcessor.fillInjectionProperties Injection
> data
> > not found in JNDI context:
> > jndiName='comp/env/org.javaee7.jms.batch.SubscriptionCreator/factory',
> > target=org.javaee7.jms.batch.SubscriptionCreator/factory^M
> > 14-Sep-2016 21:45:18.363 WARNING [http-nio-0.0.0.0-8080-exec-3]
> > org.apache.openejb.InjectionProcessor.fillInjectionProperties Injection
> data
> > not found in JNDI context:
> > jndiName='comp/env/org.javaee7.jms.batch.SubscriptionCreator/topic',
> > target=org.javaee7.jms.batch.SubscriptionCreator/topic^M
> > 14-Sep-2016 21:45:18.363 SEVERE [http-nio-0.0.0.0-8080-exec-3]
> > org.apache.openejb.core.transaction.EjbTransactionUtil.
> handleSystemException
> > EjbTransactionUtil.handleSystemException: null^M
> >  java.lang.NullPointerException^M
> > at
> > org.javaee7.jms.batch.SubscriptionCreator.createSubscription(
> SubscriptionCreator.java:37)^M
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)^M
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)^M
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)^M
> > at java.lang.reflect.Method.invoke(Method.java:498)^M
> > at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext$
> Invocation.invoke(ReflectionInvocationContext.java:205)^M
> > at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext$
> LifecycleInvocation.invoke(ReflectionInvocationContext.java:237)^M
> > at
> > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(
> ReflectionInvocationContext.java:186)^M
> > at
> > org.apache.openejb.monitoring.StatsInterceptor.record(
> StatsInterceptor.java:181)^M
> > at
> > org.apache.openejb.monitoring.StatsInterceptor.Pos

Re: TomEE 7.0.1 JMS/MDB

2016-09-15 Thread Romain Manni-Bucau
Le 15 sept. 2016 04:23, "vnalla"  a écrit :
>
> Hi
>
>
> 1) message.getBody(String.class) is not working - I have to change the
code
> for both the client and MDB to  pass TextMessage object and cast message
to
> TextMessage object and get the text using getText() method. Is there any
> special setting required? - I used javaee7 jms-xa example

Yes, you can assign me a jira, will fix it for 7.0.2

>
> 2) JMS 2.0 configuration is not working - not sure what I am doing wrong,
I
> tried to change the names a bit. This example also taken from javaee7 -
> jms-batch example.
>

If not working renaming the app "foo.war" same comment

> @JMSDestinationDefinition(
> name = Resources.TOPIC,
> resourceAdapter = "jmsra",
> interfaceName = "javax.jms.Topic",
> destinationName = "batch.topic",
> description = "Batch processing topic")
> @JMSConnectionFactoryDefinition( // <1> WildFly appears to require user
and
> password to be set for connection factories
> name = Resources.CONNECTION_FACTORY,
> resourceAdapter = "jmsra",
> clientId = "batchJob", // <2> It is not allowed to call +setClientId+
on
> +Connection+ or +JMSContext+ in Java EE container.
> description = "Connection factory with clientId of the durable
> subscription")
> public class Resources {
> public static final String SUBSCRIPTION = "BatchJob"; // <3> Durable
> consumer is uniquely identified with its +clientId+ and
+subscriptionName+.
> //public static final String TOPIC = "java:app/batch/topic";
> public static final String TOPIC = "batch_topic";
> public static final String CONNECTION_FACTORY = "batch_factory";
> }
>
> throwing exceptions:
>
> 14-Sep-2016 21:45:18.356 INFO [http-nio-0.0.0.0-8080-exec-3]
> org.apache.openejb.assembler.classic.Assembler.startEjbs Created
> Ejb(deployment-id=ResultCollector, ejb-name=ResultCollector,
> container=Default Singleton Container)^M
> 14-Sep-2016 21:45:18.357 INFO [http-nio-0.0.0.0-8080-exec-3]
> org.apache.openejb.assembler.classic.Assembler.startEjbs Created
> Ejb(deployment-id=SubscriptionCreator, ejb-name=SubscriptionCreator,
> container=Default Singleton Container)^M
> 14-Sep-2016 21:45:18.357 INFO [http-nio-0.0.0.0-8080-exec-3]
> org.apache.openejb.assembler.classic.Assembler.startEjbs Started
> Ejb(deployment-id=ResultCollector, ejb-name=ResultCollector,
> container=Default Singleton Container)^M
> 14-Sep-2016 21:45:18.362 WARNING [http-nio-0.0.0.0-8080-exec-3]
> org.apache.openejb.InjectionProcessor.fillInjectionProperties Injection
data
> not found in JNDI context:
> jndiName='comp/env/org.javaee7.jms.batch.SubscriptionCreator/factory',
> target=org.javaee7.jms.batch.SubscriptionCreator/factory^M
> 14-Sep-2016 21:45:18.363 WARNING [http-nio-0.0.0.0-8080-exec-3]
> org.apache.openejb.InjectionProcessor.fillInjectionProperties Injection
data
> not found in JNDI context:
> jndiName='comp/env/org.javaee7.jms.batch.SubscriptionCreator/topic',
> target=org.javaee7.jms.batch.SubscriptionCreator/topic^M
> 14-Sep-2016 21:45:18.363 SEVERE [http-nio-0.0.0.0-8080-exec-3]
>
org.apache.openejb.core.transaction.EjbTransactionUtil.handleSystemException
> EjbTransactionUtil.handleSystemException: null^M
>  java.lang.NullPointerException^M
> at
>
org.javaee7.jms.batch.SubscriptionCreator.createSubscription(SubscriptionCreator.java:37)^M
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)^M
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)^M
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)^M
> at java.lang.reflect.Method.invoke(Method.java:498)^M
> at
>
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)^M
> at
>
org.apache.openejb.core.interceptor.ReflectionInvocationContext$LifecycleInvocation.invoke(ReflectionInvocationContext.java:237)^M
> at
>
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)^M
> at
>
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:181)^M
> at
>
org.apache.openejb.monitoring.StatsInterceptor.PostConstruct(StatsInterceptor.java:109)^M
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)^M
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)^M
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)^M
> at java.lang.reflect.Method.invoke(Method.java:498)^M
> at
>
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)^M
> at
>
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)^M
> at
>
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)^M
> a