File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot set MDB activation config propertiesin deployment descriptor