geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: Accessing JMS resources from application client
Date Thu, 23 Mar 2006 23:29:24 GMT
I don't think you can connect to a JMS resource living in the server
from an application client (nor can a client access a server-side JDBC
pool; an app client can only remotely access EJBs running in the
server).

However, there is a trick whereby you essentailly configure the client
to independently connect to the same JMS server so it will still send
and receive messages using the same JMS topics/queues.  I believe what
you need to do in order to make this work is to add the kind of
settings that are in your connector deployment plan to your
geronimo-application-client.xml deployment plan, so the app client
also knows how to connect to the JMS server.  I don't have an example
of this, but I know there are some out there -- perhaps David J can
point you to one?

Thanks,
    Aaron

On 3/23/06, Marsha Johnson <majohnson@jpsco.com> wrote:
> HI,
>
> I am using IBM Websphere Application Server Community Edition and I am trying
> to create a client application that will consume messages from a queue created
> from a deployment plan external to the application.  Both the queue and
> connection factory have been successfully deployed from the following plan:
>
> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
> configId="org/apache/geronimo/OPJmsPlan"
> parentId="geronimo/activemq/1.0/car">
> <resourceadapter>
> <resourceadapter-instance>
> <resourceadapter-name>OP JMS RA</resourceadapter-name>
> <config-property-setting name="ServerUrl">tcp://0.0.0.0:61616</config-property-
> setting>
> <config-property-setting name="UserName">geronimo</config-property-setting>
> <config-property-setting name="Password">geronimo</config-property-setting>
> <workmanager>
> <gbean-link>DefaultWorkManager</gbean-link>
> </workmanager>
> </resourceadapter-instance>
> <outbound-resourceadapter>
> <connection-definition>
> <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-
> interface>
> <connectiondefinition-instance>
> <name>jms/OPConnFactory1</name>
> <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
> <connectionmanager>
> <xa-transaction>
> <transaction-caching/>
> </xa-transaction>
> <single-pool>
> <max-size>10</max-size>
> <blocking-timeout-milliseconds>60000</blocking-timeout-milliseconds>
> <match-one/>
> </single-pool>
> </connectionmanager>
> </connectiondefinition-instance>
> </connection-definition>
> </outbound-resourceadapter>
> </resourceadapter>
> <adminobject>
>  <adminobject-interface>javax.jms.Queue</adminobject-interface>
> <adminobject-class>org.codehaus.activemq.message.ActiveMQQueue</adminobject-
> class>
>  <adminobject-instance>
>    <message-destination-name>jms/OPQueue</message-destination-name>
>    <config-property-setting name="PhysicalName">OPQueuePD</config-property-
> setting>
>  </adminobject-instance>
> </adminobject>
> </connector>
>
>
> My application-client.xml deployment plan has the following code:
>
> <resource-ref>
>  <res-ref-name>jms/OPConnFactory1</res-ref-name>
>  <res-type>javax.jms.QueueConnectionFactory</res-type>
>  <res-auth>Container</res-auth>
>  <res-sharing-scope>Shareable</res-sharing-scope>
> </resource-ref>
> <message-destination-ref>
>  <message-destination-ref-name>jms/OPQueue</message-destination-ref-name>
>  <message-destination-type>javax.jms.Queue</message-destination-type>
>  <message-destination-usage>Consumes</message-destination-usage>
>  <message-destination-link>jms/OPQueue</message-destination-link>
> </message-destination-ref>
>
> <message-destination>
>  <message-destination-name>jms/OPQueue</message-destination-name>
> </message-destination>
>
> My geronimo-application-client.xml deployment plan has the following code:
>
> <naming:resource-ref>
>   <naming:ref-name>jms/OPConnFactory1</naming:ref-name>
>   <naming:resource-link>jms/OPConnFactory1</naming:resource-link>
> </naming:resource-ref>
>
> However, when I try to deploy I get the following message:
> Error: Unable to distribute OPConsumer.ear: Unable to resolve
> resource reference 'jms/OPConnFactory1' (no matching resources
> found)
>
>
> What am I doing wrong?
>
>
>

Mime
View raw message