Thanks, that did the trick for me.

Now i am experiencing the next problem:

I have created queues for my app in the console, and deployed the plan
that it created.

the plan for the queues looks like this:

<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1";>
   <dep:environment
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1";>
       <dep:moduleId>
           <dep:groupId>my.group</dep:groupId>
           <dep:artifactId>queues</dep:artifactId>
           <dep:version>1.0</dep:version>
           <dep:type>rar</dep:type>
       </dep:moduleId>
       <dep:dependencies>
           <dep:dependency>
               <dep:groupId>geronimo</dep:groupId>
               <dep:artifactId>activemq-broker</dep:artifactId>
               <dep:type>car</dep:type>
           </dep:dependency>
       </dep:dependencies>
   </dep:environment>

....

   <adminobject>
       <adminobject-interface>javax.jms.Queue</adminobject-interface>
       <adminobject-class>org.activemq.message.ActiveMQQueue</adminobject-class>

       <adminobject-instance>
           
<message-destination-name>/my/queue/QueueName</message-destination-name>
           <config-property-setting
name="PhysicalName">WtfQueue</config-property-setting>
       </adminobject-instance>

i changed the dependency in my geronimo-web.xml to depend on this file:

   <d:environment>
       <d:dependencies>
           <d:dependency>
               <d:groupId>my.group</d:groupId>
               <d:artifactId>queues</d:artifactId>
           </d:dependency>
       </d:dependencies>
   </d:environment>

And if i try to lookup the queue in my code i get this stacktrace:


   <bean id="testDestination"
class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName">
           <value>/my/queue/QueueName</value>
       </property>
   </bean>

Initialization of bean failed; nested exception is
javax.naming.NameNotFoundException:
javax.naming.NameNotFoundException:
       at 
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:90)
       at 
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:98)
       at javax.naming.InitialContext.lookup(InitialContext.java:347)
       at 
org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123)

So it seems i cant look up the queue from the global jndi context.
Do i need to map all the queues that i need in geronimo-web.xml and
web.xml to get them into the java:comp/env/ namespace? I would rather
not do that because then i have to define my queuese in 3 different
places. Or am I making a stupid mistake?


thanks, regards
chris
On 6/8/06, David Jencks <[EMAIL PROTECTED]> wrote:
Probably you are missing a dependency from your app to the activemq
configuration.  In 1.1 resource references need to be resolvable in
the set of ancestors of your module.  In other words, your app has to
depend on the rar deployment.

Make sure your plan includes something like
<environment>
...
<dependencies>
   <dependency>
     <groupId>geronimo</groupId>
     <artifactId>activemq</artifactid>
   </dependency>
...
<dependencies>
</environment>

Hope I got all the names right :-)
version is unnecessary

thanks
david jencks

On Jun 8, 2006, at 1:41 PM, Christoph Sturm wrote:

> hey!
>
> i have this in my web.xml:
>
>    <resource-ref>
>        <res-ref-name>ConnectionFactory</res-ref-name>
>        <res-type>javax.jms.ConnectionFactory</res-type>
>        <res-auth>Container</res-auth>
>        <res-sharing-scope>Shareable</res-sharing-scope>
>    </resource-ref>
>
> and this in my geronimo-web.xml:
>
>    <n:resource-ref>
>        <n:ref-name>ConnectionFactory</n:ref-name>
>        <n:resource-link>DefaultActiveMQConnectionFactory</
> n:resource-link>
>    </n:resource-ref>
>
> and when i deploy the war i get this error:
>
> org.apache.geronimo.common.DeploymentException: Unable to resolve
> resource reference 'ConnectionFactory' (Could not find resource
> 'DefaultActiveMQConnectionFactory'.  Perhaps it has not yet been
> configured, or your application does not have a dependency declared
> for that resource module?)
>
> (I am using the geronimo 1.1 candidate)
>
> what am i doing wrong?
>
> thanks
> chris
> --
> [EMAIL PROTECTED]




--
[EMAIL PROTECTED]

Reply via email to