geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste <Jean-Baptiste.Lapl...@montrealboutique.com>
Subject Annotations and JNDI
Date Thu, 10 Apr 2008 18:26:48 GMT
Hello,

Are Ressource mappedName annotations supported within Geronimo?

I'm trying to instantiate a ConnectionFactory using the following code:
@Resource(mappedName="jms/broker")
   private static QueueConnectionFactory connectionFactory;

I have added a dependency to activemq using the following:
<sys:dependency>
	<sys:groupId>org.apache.geronimo.configs</sys:groupId>
      <sys:artifactId>activemq-ra</sys:artifactId>
</sys:dependency>

I have created a reference to the Default connection factory
<nam:resource-ref>
	<nam:ref-name>jms/broker</nam:ref-name>
	
<nam:resource-link>DefaultActiveMQConnectionFactory</nam:resource-link>
</nam:resource-ref> 

I have added this to my web.xml
<resource-ref>
	<res-ref-name>jms/broker</res-ref-name>
	<res-type>javax.jms.QueueConnectionFactory</res-type>
	<res-auth>Container</res-auth>
</resource-ref>

But... it doest not work, am I missing something or it is just not supported
(yet ?!). Thanks !

Distribution of configuration failed.  See log for details.
  Unable to resolve resource reference
'com.testwm.Servlet2/connectionFactory' (Could not auto-map to resource.
Try adding a resource-ref mapping to your Geronimo deployment plan.
  Search conducted in current module and dependencies:
  [ALL: org.apache.geronimo.configs/activemq-ra//]
  [ALL: org.apache.geronimo.configs/tomcat6/2.1/car]
  [ALL: org.apache.geronimo.configs/openjpa//car]
  [CLASSES: org.apache.geronimo.configs/openejb//car]
  [ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
  [ALL: org.apache.geronimo.configs/axis//car]
  [ALL: org.apache.geronimo.configs/axis2//car]
  )
  org.apache.geronimo.common.DeploymentException: Unable to resolve resource
reference 'com.testwm.Servlet2/connectionFactory' (Could not auto-map to
resource.  Try adding a resource-ref mapping to your Geronimo deployment
plan.
  Search conducted in current module and dependencies:
  [ALL: org.apache.geronimo.configs/activemq-ra//]
  [ALL: org.apache.geronimo.configs/tomcat6/2.1/car]
  [ALL: org.apache.geronimo.configs/openjpa//car]
  [CLASSES: org.apache.geronimo.configs/openejb//car]
  [ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
  [ALL: org.apache.geronimo.configs/axis//car]
  [ALL: org.apache.geronimo.configs/axis2//car]
  )
  	at
org.apache.geronimo.connector.deployment.ResourceRefBuilder.buildNaming(Reso
urceRefBuilder.java:207)
  	at
org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(Nami
ngBuilderCollection.java:53)
  	at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.configureBasic
WebModuleAttributes(AbstractWebModuleBuilder.java:842)
  	at
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatMo
duleBuilder.java:343)
  	at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(Switchi
ngModuleBuilder.java:165)
  	at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARC
onfigBuilder.java:647)
  	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
  	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
  	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
  	at java.lang.reflect.Method.invoke(Method.java:597)
  	at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionM
ethodInvoker.java:34)
  	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:
124)
  	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:86
7)
  	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
  	at
org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
  	at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)
  	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
  	at java.lang.reflect.Method.invoke(Method.java:597)
  	at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionM
ethodInvoker.java:34)
  	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:
124)
  	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:86
7)
  	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
  	at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java
:172)
  	at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanSer
verInterceptor.java:836)
  	at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
  	at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.
java:1426)
  	at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.j
ava:72)
  	at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMICon
nectionImpl.java:1264)
  	at java.security.AccessController.doPrivileged(Native Method)
  	at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConne
ctionImpl.java:1366)
  	at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:
788)
  	at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
  	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
  	at java.lang.reflect.Method.invoke(Method.java:597)
  	at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
  	at sun.rmi.transport.Transport$1.run(Transport.java:159)
  	at java.security.AccessController.doPrivileged(Native Method)
  	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
  	at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
  	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:
790)
  	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:6
49)
  	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:885)
  	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
07)
  	at java.lang.Thread.run(Thread.java:619)

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.11/1368 - Release Date: 09/04/2008
4:20 PM
 


Mime
View raw message