Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JRUN and EJB.. lotsa problem  RSS feed

 
Paul McKenna
Ugly Redneck
Ranch Hand
Posts: 1006
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Folks,
I am desperate for help.. consider the following files and tell me what I am doing wrong.. thanks in advance
Remote Interface : Test.java
----------------------------
import javax.ejb.*;
import java.rmi.*;
public interface Test extends EJBObject
{
public String getF1() throws RemoteException;
public String getF2() throws RemoteException;
}
Home Interface : TestHome.java
------------------------------
import javax.ejb.*;
import java.rmi.*;
public interface TestHome extends EJBHome
{
public Test findByPrimaryKey(String f1) throws FinderException, RemoteException;
}
Bean Implementation : TestBean.java
-----------------------------------
import javax.ejb.*;
import java.rmi.*;
public class TestBean implements EntityBean
{
String f1 = null;
String f2 = null;
protected EntityContext ctx = null;
public String getF1() throws RemoteException
{
return this.f1;
}
public String getF2() throws RemoteException
{
return this.f2;
}
public String ejbFindByPrimaryKey(String f1) throws FinderException, RemoteException
{
return f1;
}
public void setEntityContext(EntityContext context) throws RemoteException
{
this.ctx = context;
}
public void unsetEntityContext() throws RemoteException
{
this.ctx = null;
}

public void ejbActivate() throws RemoteException
{}
public void ejbPassivate() throws RemoteException
{}
public void ejbLoad()
{}
public void ejbStore()
{}
public void ejbRemove()
{}
}
Test.properties file
--------------------
ejb.homeInterfaceClassName=TestHome
ejb.remoteInterfaceClassName=Test
ejb.enterpriseBeanClassName=TestBean
ejb.primaryKeyClassName=java.lang.String
ejb.beanHomeName=TestHome
ejb.containerManagedFields=f1,f2
ejipt.findByPrimaryKeySQL=SELECT f1,f2 WHERE f1=?
ejipt.findByPrimaryKeySQL.source=source1
ejipt.findByPrimaryKeySQL.params=f1
ejipt.findByPrimaryKeySQL.paramTypes=VARCHAR
ejipt.findByPrimaryKeySQL.fields=f1,f2
Deploy.properties file
----------------------
ejipt.classServer.host=localhost
ejipt.jdbcSources=source1
source1.ejipt.sourceURL=jdbc dbc:login

When using the stand alone mode of the EJB server, I get the error : "Warning: No beans found in the jar"
When using the JRUN managment console, I am informed that the jar file has been successfully deployed, but I donot see any binding of the home interface in the JNDI context.
Please help.. very very urgent.
Thanks
Sriraj Rajaram
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!