Im migrating our deployment descriptors from EJB 2.x to EJB version 3.x. Currently im getting the following error:
[exec] [wsadmin] com.ibm.ejs.container.EJBConfigurationException:
com.ibm.ejs.container.EJBConfigurationException:
The MyBean enterprise bean in the ejb.jar module has no EJB type defined.
Now according to http://docs.oracle.com/cd/A97335_02/apps.102/a83725/xml1.htm this is my ejb-jar.xml element for the enterprise bean definition:
<enterprise-beans>
<session id="MyBean">
<ejb-name>MyBean</ejb-name>
<ejb-class>foo.MyBean</ejb-class>
<env-entry>
<description>
</description>
<env-entry-name>bootloader.config</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>my_config</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
The above element "session" should define the beans type which is session since the according Class it implements the javax.ejb.SessionBean interface.
Am i missing anything here already? Or do i have to adjust the bean class itself as well when migrating those deployment descriptors?
Best Regards and thanks in advance
Ok i figured it out. I forgot the websphere specific deployment descriptor which now looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar-bnd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://websphere.ibm.com/xml/ns/javaee" version="1.1">
<session name="MyBean" simple-binding-name="MyBean">
<resource-ref name="jms/foo/" binding-name="jms/foo"/>
</session>
</ejb-jar-bnd>
And now i was able to deploy the application.