activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hhfrancois (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-5528) Connection Factory Properties not effective for MDB
Date Tue, 20 Jan 2015 23:17:34 GMT

    [ https://issues.apache.org/jira/browse/AMQ-5528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14284621#comment-14284621
] 

hhfrancois commented on AMQ-5528:
---------------------------------

Sorry Timothy if I didn't respect the standard process for post an issue.
What do you mean by these should go to users mailing list ?
It's a real problem believe me, I test everything (I think), I look the code for try this
problem.
In fact, the is two similar object in activeMQ :
org.apache.activemq.ActiveMQConnectionFactory and org.apache.activemq.ra.ActiveMQConnectionFactory
For the Producer, The ra.ConnectionFactory is injected, and this class is correctly managed
by the container.
But for MDB, the non ra is used and non managed so without configuration.
Maybe I can to give an ear for test that in glassfish ?
For test, it's really easy, 
1 activemq
1 glassfish with resources created
1 ear
Tell me.

> Connection Factory Properties not effective for MDB
> ---------------------------------------------------
>
>                 Key: AMQ-5528
>                 URL: https://issues.apache.org/jira/browse/AMQ-5528
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JCA Container
>    Affects Versions: 5.10.0
>         Environment: glassfish >= 3.1
> activemq-5.10.0
> project jee >=5
> activemq-ra.5.10.0.rar
> ear + ejb + mdb +servlet
>            Reporter: hhfrancois
>
> In glassfish deploy activemq-ra
> create jms connectorFactory jms/testConnectionFactory
> with property serverUrl = activemqUrl
> create jms queue jms/testQueue
> create sessionBean producer with injecteds resources jms/testConnectionFactory and testQueue.
> create servlet for launch producer.
> This works.
> But now create MDB with  Activation Spec Properties
> *destination = "jms/testQueue"*
> *destinationType = "Queue"*
> in glassfish-ejb-jar.xml configure the mdb 
> {code:xml:title=glassfish-ejb-jar.xml|borderStyle=solid}
> <enterprise-beans>
>    <ejb>
>       <ejb-name>MDB-NAME<ejb-name>
>       <mdb-connection-factory>
>           <jndi-name>jms/testConnectionFactory</jndi-name>
>       </mdb-connection-factory>
>    </ejb>
> </enterprise-beans>
> {code}
> the MDB doesnt work, I can't use the connectionFactory for MDB why ?
> This technic works perfectly with openMQ but not with activeMQ
> If I place the conguration on resource-adapter with  Resource Adapter Properties and
define in glassfish-ejb-jar.xml 
> {code:xml:title=glassfish-ejb-jar.xml|borderStyle=solid}
> <enterprise-beans>
>    <ejb>
>       <ejb-name>MDB-NAME<ejb-name>
>       <mdb-resource-adapter>
>          <resource-adapter-mid>activemq-ra.5.10.0</resource-adapter-mid>
>       </mdb-resource-adapter>
>    </ejb>
> </enterprise-beans>
> {code}
> this works, but If I want to use 2 differents business activemq for 1 application, how
I do ? 
> The solution is deploy 2 or more resource-adapter, but this is unstable and ugly. The
logic is I deploy 1 resource-adapter and configure separatly 2 connectionFactories/pools.
> When I look sources of ra, I feel that the MDB doesn't use ra connectionFactory config
in glassfish. just adapter config and spec from MDB.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message