Tuesday, 21 April 2009

8-Writing JAVA Clients for Calling BEA WebLogic EJBs

VIII- java2s JBOSS ejb still does not work and the solution

File : ejb.jar in the src/META-INF lib

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD

Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar >

<description>EJB Examples</description>
<display-name>EJB Examples</display-name>

<enterprise-beans>

<!-- Session Beans -->
<session >
<description>EJB Calc ARS Session Bean</description>
<display-name>EJB Calc ARS Session Bean</display-name>

<ejb-name>CalcARSBean</ejb-name>

<home>bean.CalcARSBeanHome</home>
<remote>bean.CalcARSBean</remote>
<local-home>bean.CalcARSBeanLocalHome</local-home>
<local>bean.CalcARSBeanLocal</local>
<ejb-class>bean.CalcARSSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>

<env-entry>
<env-entry-name>CalcARSBean</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>Calc ARS bean</env-entry-value>
</env-entry>

</session>

</enterprise-beans>

<!-- Relationships -->

<!-- Assembly Descriptor -->
<assembly-descriptor >

<method-permission >
<description>Session Bean</description>
<unchecked/>
<method >
<description>Session Bean</description>
<ejb-name>CalcARSBean</ejb-name>
<method-name>*</method-name>
</method>
</method-permission>
</assembly-descriptor >
</ejb-jar>

File : weblogic-ejb-jar in the src/META-INF lib
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.

//DTD WebLogic 6.0.0 EJB//EN" "http://www.bea.com/servers

/wls600/dtd/weblogic-ejb-jar.dtd">

<weblogic-ejb-jar>
<description>java2s Bean Example</description>
<weblogic-enterprise-bean>
<ejb-name>CalcARSBean</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<reference-descriptor>
</reference-descriptor>
<jndi-name>CalcARSSessionBean</jndi-name>
<local-jndi-name>CalcARSBeanLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>

( prev ) ( next )