This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes Cannot set MDB activation config propertiesin deployment descriptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Cannot set MDB activation config propertiesin deployment descriptor " Watch "Cannot set MDB activation config propertiesin deployment descriptor " New topic
Author

Cannot set MDB activation config propertiesin deployment descriptor

Irene Levina
Greenhorn

Joined: Jul 25, 2006
Posts: 2
Having trouble to add new Application to the WAS(using Administrative console). Application file is jar that contains MDB class implementation and ejb-jar.xml.
If deployment descriptor contains activation config property then I am getting an error that file is corrupted, removing activation config property solve my problem with creating new application that is bound to our JCA Adaptor/Resource Activation Spec. Not sure why I am getting an error, since <activation-config> is standard element that can be specified in MDB deployment descriptor, or I have to do something special for WAS, same deccriptor works fine with JBoss. So is anybody aware why I am getting this error if <activation-config> is defined in my ejb-jar.xml.

Below is ejb-jar.xml that doesn't work with WAS:

////////////////////////////////////////////
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"<br /> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br /> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee<br /> <a href="http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"" target="_blank" rel="nofollow">http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"</a><br /> version="2.1">

<enterprise-beans>
<message-driven>
<ejb-name>SonicQueueMDB</ejb-name>
<ejb-class>com.sonicsw.sonicmq.asi.samples.SonicSampleMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>SonicJMS/Queues/SampleQ1</activation-config-property-value>
</activation-config-property>
</activation-config>
<transaction-type>Container</transaction-type>
</message-driven>
</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>SonicQueueMDB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>

</ejb-jar>

//////////////////////
Irene Levina
Greenhorn

Joined: Jul 25, 2006
Posts: 2
Well just for anybody who is wondering why it was a failure in my case, according ESB 2.1 message-agnostic element <activation-config> must be defined along with <message-destination-type> element for JMS based MDB (it could be javax.jms.Queue or javax.jms.Topic) and it is IMPORTANT!! to specify it

In short just adding
<message-destination-type>javax.jms.Queue</message-destination-type> to deployment descriptor just solve problem
 
wood burning stoves
 
subject: Cannot set MDB activation config propertiesin deployment descriptor
 
Similar Threads
MDB questions
JNDI lookup error in MDB
MDB deployed in WebLogic and Queues in IBM MQ
IBM Websphere v6 and JBoss 4x MQ Connectivity - Please Help
Associate Same Mdb file to multiple queue in Ejb3 jboss 5.x server