It almost works. I had to specify ProviderIntegrationMode = jndi in the
Resource block like this because broker url in the connection properties is
ignored (and it always tries to connect to localhost)

<Resource id="MySonicAdapter" type="GenericJMSRA"
provider="com.kaltire:genericra">
        UserName = brCentral
        Password = brCentral
        ProviderIntegrationMode = jndi
        JndiProperties = "java.naming.provider.url=tcp://dev.test:1401"
    </Resource>

Getting this exception:

Sep 28, 2015 10:26:41 AM
org.apache.geronimo.connector.outbound.MCFConnectionInterceptor
getConnection
SEVERE: Error occurred creating ManagedConnection for handle:
nullManagedConnectionInfo:
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@63a8d3d. mc:
null]
javax.resource.ResourceException: Name [sonicConnectionFactory] is not bound
in this Context. Unable to find [sonicConnectionFactory].
        at
com.sun.genericra.util.ExceptionUtils.newResourceException(ExceptionUtils.java:73)
        at
com.sun.genericra.outbound.AbstractManagedConnectionFactory.createManagedConnection(AbstractManagedConnectionFactory.java:128)
        at
org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:48)
        at
org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
        at
org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:70)
        at
org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:80)
        at
org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:49)
        at
org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:101)
        at
org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)
        at
org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)
        at
org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)
        at
org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:81)
        at
com.sun.genericra.outbound.ConnectionFactory.createConnection(ConnectionFactory.java:75)
        at com.kaltire.application.BookService.sendMessage(BookService.java:66)

Caused by: javax.resource.spi.InvalidPropertyException: Name
[sonicConnectionFactory] is not bound in this Context. Unable to find
[sonicConnectionFactory].
        at
com.sun.genericra.util.ExceptionUtils.newInvalidPropertyException(ExceptionUtils.java:42)
        at
com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.createObject(ObjectBuilderFactory.java:99)
        at com.sun.genericra.util.ObjectBuilder.build(ObjectBuilder.java:99)
        at
com.sun.genericra.outbound.AbstractManagedConnectionFactory.initializeConnectionFactory(AbstractManagedConnectionFactory.java:182)
        at
com.sun.genericra.outbound.AbstractManagedConnectionFactory.createManagedConnection(AbstractManagedConnectionFactory.java:118)
        ... 74 more
Caused by: javax.naming.NameNotFoundException: Name [sonicConnectionFactory]
is not bound in this Context. Unable to find [sonicConnectionFactory].
        at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
        at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
        at javax.naming.InitialContext.lookup(InitialContext.java:417)
        at
com.sun.genericra.util.ObjectBuilderFactory$JndiObjectBuilder.createObject(ObjectBuilderFactory.java:97)
        ... 77 more








--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Connect-to-external-non-ActiveMQ-JMS-server-tp4676331p4676351.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to