I have JBoss 4.0.3SP1, and I have a Session Bean with a Remote interface (ExecutionReportOperator), and an Entity Bean with a local interface (ExecutionReport). Here is the JBoss output:
INFO [EjbModule] Deploying ExecutionReport
INFO [EjbModule] Deploying ExecutionReportOperator
INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'ExecutionReport' to jndi 'local/ExecutionReport@4199584'
INFO [ProxyFactory] Bound EJB Home 'ExecutionReportOperator' to jndi 'ExecutionReportOperator'
INFO [EJBDeployer] Deployed: file:/C:/Program Files/jboss-4.0.3SP1/server/default/deploy/ExecReportingEJBs.jar
Now, within my Session bean, I'm trying to get a reference to the Home interface of my Entity bean:
private ExecutionReportHome getExecutionReportHomeObject()
throws NamingException {
InitialContext ic = new InitialContext();
ExecutionReportHome erh = (ExecutionReportHome) ic.lookup("ExecutionReport");
return erh;
}
However this throws a Naming exception. I guess the string I'm sending in to the lookup() method needs to be adjusted/modified. I've tried "local/ExecutionReport" as well as the full package name, no luck. Does anyone know what the string should look like?