Skip to main content

How can I deploy a MessageDrivenBean to receive messages via an 'external' Resource Adapter

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
RobertAshworth
Offline
Joined: 2012-02-21

We provide a proprietary JMS Resource Adapter that allows messages to be sent to and from a messaging-enabled Transaction Processing system running on a legacy server. The Resource Adapter has to be installed into an Application Server, together with any applications such as message driven beans. Resources such as connection factories and queues have to be created to 'connect' the application server to the TP system. In the past we used Sun AS 8 and the configuration required was performed using DeployTool which produced a .ear file that contained the necessary details in files such as ejb-jar.xml and sun-ejb-jar.xml. Deploying the .ear file achieved the configuration needed.
Now that we are using GlassFish (and NetBeans) we cannot find a way to specify the required attributes (because there is no DeployTool). In the java source you can use the @ActivationConfigProperty items but any proprietary properties used only by our resource adapter are not recognised: the key seems to be how to specifiy that this is the one to use instead of the GlassFish one.
The following item from the sun-ejb-jar.xml appears to declare that our RA is to be used:

HostTalkJMS

I was able to successfully deploy and run a Message Driven Bean that used our RA by manually adding old copies of files sun-ejb-jar.xml and ejb-jar.xml to the .jar file containing the MDB and deploying it in GlassFish. Although this works I would like to know if there is a better way, for example using the GlassFish administrator and/or NetBeans.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
RobertAshworth
Offline
Joined: 2012-02-21

The required text is still missing - looks like anything inside annotation characters are being removed.
The attribute names in the .xml file are 'mdb-resource-adapter' and 'resource-adapter-mid'

RobertAshworth
Offline
Joined: 2012-02-21

The extract from the sun-ejb-jar.xml file did not appear correctly. It looks like this:


HostTalkJMS