geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krishnakumar B <www....@gmail.com>
Subject Re: Admin Objects reeference in WAR
Date Fri, 09 Dec 2005 08:28:49 GMT
Hi Aaron/David,

Thanks for the answers. It works now. The StackOverflow is because of
some recursive code in application. So its not anything to do with
Geronimo.

To close this mail chain and for reference

I added message destination ref in web.xml. Its not required in
geronimo-web.xml
and the admin object of Queue type is available now in Web application.

Regards
Krishnakumar B



On 12/8/05, Aaron Mulder <ammulder@alumni.princeton.edu> wrote:
> Could you file a JIRA bug for the stack overflow with your config
> files and if you can, at least a little piece of the stack trace that
> shows which Geronimo code is involved?  We should definitely fix
> that!!!  Your configuration needs to be changed a bit, but I think we
> can put together a more helpful error message.  :)
>
> In any case, you shouldn't have a message-destination-ref in web.xml
> and a resource-env-ref in geronimo-web.xml -- either they should both
> be resource-env-ref, or your web.xml should use a message-destination
> and a message-destination-ref and then your geronimo-web.xml should
> use a message-destination (but only if the message-destination name is
> different than the admin object name).
>
> Thanks,
>    Aaron
>
> On 12/8/05, Krishnakumar B <www.bkk@gmail.com> 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