geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Admin Objects reeference in WAR
Date Thu, 08 Dec 2005 16:05:32 GMT
Please don't mix the two styles.  I haven't reviewed the specs on this  
recently but I think that if you have a message-destination-ref you  
need to declare a message-destination somewhere in your ear.   I think  
that if you make the queue name jms/ivtQ rather than ivtQ, then you  
will not need any entries in the geronimo-web plan and geronimo will  
find the queue for you.

hope this helps, don't have time for a longer answer right now.

david jencks

On Dec 8, 2005, at 4:20 AM, Krishnakumar B wrote:

> HI David,
>
> I tried the changes u suggested. I get a java.lang.StackOverflowError
> in Servlet when i lookup a Queue in JNDI.
>
> The web.xml i have changed to
>
> <message-destination-ref id="MessageDestinationRef_1">
>           
> <message-destination-ref-name>jms/ivtQ</message-destination-ref-name>
>           
> <message-destination-type>javax.jms.Queue</message-destination-type>
>           
> <message-destination-usage>Produces</message-destination-usage>
>          <message-destination-link>ivtQ</message-destination-link>
> </message-destination-ref>
>
> and geronimo-web.xml to
>
> <naming:resource-env-ref>
>               <naming:ref-name>jms/ivtQ</naming:ref-name>
>                
> <naming:message-destination-link>ivtQ</naming:message-destination- 
> link>
> </naming:resource-env-ref>
>
> and in Servlet i do
>
> Queue q = (Queue)getContext().lookup("java:comp/env/jms/ivtQ");
>
> This leads to a StackOverflow.
>
> The code works if i do Queue q = qSess.createQueue("TEST.QUEUE");
>
> So it fails in this lookup.
>
> Any thoughts on this why it occurs...
>
> Regards
> Krishnakumar B
>
>
>
>
> On 12/8/05, David Jencks <david_jencks@yahoo.com> wrote:
>> resource-ref is for a datasource, jms connection factory, or other
>> connection factory.  Admin objects need to be referenced via
>> message-destination-refs or resource-env-refs.  Changing all your
>> resource-refs to resource-env-refs will probably work, although the
>> message-destination-ref stuff is a little neater.
>>
>> thanks
>> david jencks
>>
>> On Dec 8, 2005, at 12:16 AM, Krishnakumar B wrote:
>>
>>> hi,
>>>
>>> I am trying to create a reference to Admin Objects ( Queue ) in WAR.  
>>> I
>>> get a
>>> Unable to resolve resource reference ( No matching resource found )
>>> during deployment.
>>>
>>> My ra.xml contains
>>>
>>> <adminobject>
>>> <adminobject-interface>javax.jms.Queue</adminobject-interface>
>>> <adminobject-class>com.test.connector.QueueImpl</adminobject-class>
>>> <config-property>
>>> <config-property-name>PhysicalName</config-property-name>
>>> <config-property-type>java.lang.String</config-property-type>
>>> </config-property>
>>> </adminobject>
>>>
>>> geronimo-ra.xml contains
>>>
>>> <adminobject>
>>>          
>>> <adminobject-interface>javax.jms.Queue</adminobject-interface>
>>>
>>> <adminobject-class>com.test.connector.QueueImpl</adminobject-class>
>>>         <adminobject-instance>
>>>             <message-destination-name>ivtQ</message-destination-name>
>>>             <config-property-setting
>>> name="PhysicalName">TEST.QUEUE</config-property-setting>
>>>         </adminobject-instance>
>>> </adminobject>
>>>
>>> web.xml contains
>>>
>>> <resource-ref id="ResourceRef_1134025819148">
>>>       <res-ref-name>jms/ivtQ</res-ref-name>
>>>       <res-type>javax.jms.Queue</res-type>
>>>       <res-auth>Container</res-auth>
>>>       <res-sharing-scope>Shareable</res-sharing-scope>
>>>  </resource-ref>
>>>
>>> and
>>>
>>> geronimo-web.xml contains
>>>
>>> <naming:resource-ref  
>>> xmlns="http://geronimo.apache.org/xml/ns/naming">
>>>         <naming:ref-name>jms/ivtQ</naming:ref-name>
>>>         <naming:resource-link>ivtQ</naming:resource-link>
>>> </naming:resource-ref>
>>>
>>> The Admin Object GBeans are started and running
>>>
>>>  [GBeanInstanceState] GBeanInstanceState for:
>>> geronimo.server:
>>> J2EEApplication=null,J2EEServer=geronimo,JCAResource=test/
>>> jms.rar,j2eeType=JCAAdminObject,name=ivtQ
>>> State changed from stopped to starting
>>> [GBeanInstanceState] GBeanInstanceState for:
>>> geronimo.server:
>>> J2EEApplication=null,J2EEServer=geronimo,JCAResource=test/
>>> jms.rar,j2eeType=JCAAdminObject,name=ivtQ
>>> State changed from starting to running
>>>
>>> One of the posts says Connector should be part of EAR. I am deploying
>>> Connector and WAR separately.
>>>
>>> Any help or ideas would be great...
>>>
>>> Regards
>>> Krishnakumar B
>>>
>>
>>
>


Mime
View raw message