You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bjarne Olsen <Bj...@gmx.net> on 2000/10/11 20:22:01 UTC
Cocoon with EJBs
Hello !
I have a problem when trying to use Java Enterprise Beans with Cocoon.
In the <xsp:include> tag i define javax.rmi.* to get the whole
rmi-package. This works for javax.naming.* for example but not for rmi.
I'm not able to create an instance of PortableRemoteObject ! Cocoon says:
No such class.
I am running cocoon on Apache 1.3.12 with Jserv 1.1.2. My EJB-Container is
jBoss.
Maybe anyboy has a clue
Bjarne
=====================
This is my xml-file:
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="page-html.xsl" type="text/xsl"?>
<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<xsp:structure>
<xsp:include>javax.naming.*</xsp:include>
<xsp:include>javax.rmi.*</xsp:include>
<xsp:include>MyEJB.*</xsp:include>
</xsp:structure>
<xsp:logic>
private String go()
{
System.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url", "localhost:1099");
Context ctx = null;
try
{
THIS WORKS==> ctx = new InitialContext();
MyEJBHome home = null;
THIS FAILES==> javax.rmi.PortableRemoteObject o = null;
}
catch (Exception e)
{
return e.toString();
}
return "HELLO";
}
</xsp:logic>
<page>
<xsp:expr>go()</xsp:expr>
</page>
</xsp:page
--
Sent through GMX FreeMail - http://www.gmx.net