This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple Test Bean in JRun - can't get deploy tool to see bean

 
paul wheaton
Trailboss
Pie
Posts: 21346
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic