aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes aliases for resources injection Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "aliases for resources injection" Watch "aliases for resources injection" New topic
Author

aliases for resources injection

matt iverson
Greenhorn

Joined: Jun 28, 2011
Posts: 2
Hi all,
i'm using Glassfish 3.1 as application server for my EAR. To create the JMS and JDBC resources required by my application i have the glassfish-resource.xml file. These resources are created with application scope so when I inject them i have to use "java:app/" e.g. @Resource(mappedName="java:app/jms/myResource").
Is possible to create an alias so i don't have to prepend the "java:app"? What i want to do is @Resource(mappedName="jms/myResource").
I need this because i have to deploy my application also in Websphere 8. There i have to create the resources before deploying the application and therefore the scope is different.
The glassfish-ejb-jar.xml may help?

Matt.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: aliases for resources injection
 
Similar Threads
Unable to understand difference between JNDI namespaces i.e java:global, java:module, and java:app.
JMS Message Destination Reference Exception
JMS: Cannot initialize ConnectionFactory
WebSphere 6.0.2.9 Delployment Problem
MDB Exceptions