I've done
EJB before with weblogic and with Sun's reference implementation. But I can't get it to work with JRun.
Here's my bean code:
<pre>
package ejb ;
import java.util.*;
import javax.ejb.* ;
public class TestBean implements SessionBean
{
public
String getText()
{
return "Spoooooon!" ;
}
public void setSessionContext( SessionContext ctx ){}
public void ejbRemove(){}
public void ejbActivate(){}
public void ejbPassivate(){}
}
package ejb ;
import javax.ejb.* ;
import java.rmi.* ;
public interface TestHome extends EJBHome
{
public TestRemote create() throws CreateException, RemoteException;
}
package ejb ;
import javax.ejb.* ;
import java.rmi.* ;
public interface TestRemote extends EJBObject
{
public String getText() throws RemoteException ;
}
</pre>
And here is my ejb_jar.xml:
<pre>
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>TestBean</ejb-name>
<home>ejb.TestHome</home>
<remote>ejb.TestRemote</remote>
<ejb-class>ejb.TestBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>TestBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
</pre>
And my default.properties:
<pre>
ejipt.maxContexts=100
</pre>
I put them in a jar and the jar tool says this:
<pre>
added manifest
adding: ejb/TestBean.class(in = 562) (out= 304)(deflated 45%)
adding: ejb/TestHome.class(in = 275) (out= 204)(deflated 25%)
adding: ejb/TestRemote.class(in = 251) (out= 189)(deflated 24%)
adding: META-INF/ejb_jar.xml(in = 905) (out= 361)(deflated 60%)
adding: default.properties(in = 23) (out= 25)(deflated -8%)
</pre>
I copy it all to the deploy directory and run the JRun deploy tool and get back "No beans found in jar(s)". What am I doing wrong?