This may be unfair, so I will ask my question in two parts.

First; I am trying to use the JavaWebServer v2.0 (trial version) to
compile a JSP and
communicate with jBoss to process an Enterprise JavaBean (EJB) deployed
there.  

The code is:


<% try { %>
    <% System .setProperty ("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory") ; %>
    <% System .setProperty ("java.naming.provider.url", "localhost:1099")
; %>
    <% javax.naming.InitialContext ctx = new javax.naming.InitialContext
() ; %>
    <% Object obj = ctx .lookup ("examples/HelloWorld") ; %>
    <% HelloWorld_ejbHome hello = (HelloWorld_ejbHome)
javax.rmi.PortableRemoteObject .narrow (obj, HelloWorld_ejbHome .class) ;
%>

<% } catch ( javax.naming.NamingException exception  ) { %>
    <% exception .printStackTrace () ; %>
<% } %>


I have tested the EJB using a simple Java client program, and similar
could works there.
Through various combination of including and excluding various, the code
above fails
at the 'ctx .lookup ("examples/HelloWorld")' with the following exception
trace returned
by the JSP servlet to my browser. (The exception is not caught by my code,
therefore it
is not a 'javax.naming.NamingException'.)



Error during JSP page processing

java.security.AccessControlException: access denied
(java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
        at
java.security.AccessController.checkPermission(AccessController.java:399)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
        at
java.lang.SecurityManager.checkConnect(SecurityManager.java:1044)
        at java.net.Socket.(Socket.java:262)
        at java.net.Socket.(Socket.java:100)
        at
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:503)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:159)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:152)
        at javax.naming.InitialContext.lookup(InitialContext.java:350)
        at
pagecompile.jsp.___cwg_Sais.___doc.___html.___jsp._examples._HelloWorld__ejb._jspService(_HelloWorld__ejb.java:102)
        at
com.sun.server.http.pagecompile.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at
com.sun.server.http.pagecompile.jsp.runtime.JspServlet.runServlet(JspServlet.java:469)
        at
com.sun.server.http.pagecompile.jsp.runtime.JspServlet.processJspPage(JspServlet.java:259)
        at
com.sun.server.http.pagecompile.jsp.runtime.JspServlet.service(JspServlet.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at com.sun.server.ServletState.callService(ServletState.java:226)
        at
com.sun.server.ServletManager.callServletService(ServletManager.java:936)
        at
com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423)
        at
com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79)
        at com.sun.server.http.stages.Runner.process(Runner.java:79)
        at
com.sun.server.ProcessingSupport.process(ProcessingSupport.java:294)
        at com.sun.server.Service.process(Service.java:204)
        at
com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374)
        at
com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:166)
        at com.sun.server.HandlerThread.run(HandlerThread.java:162)
        

My unfair question .  Is this a JavaWebServer security conflict that can
be configured to
allow a JSP in the server to communicate with a EJB deployed jBoss ?  Or
am I missing
something ?


Second, it seems that all the EJB servers that I have looked at have the
web server and
EJB server running in the same Java Virtual Machine.  I am trying to setup
a true n-tier
application where the web server and EJB server are on separate platforms.
 The EJB server
must run on a legacy platform to server data from the system.  Is it
possible to configure
a web server (perhaps Apache w/tomcat) on one platform to communicate with
jBoss on another
platform ?  And disable the web server functions built into jBoss ?


Craig J. Gregory
Director of Information Services
Blue Mountain Community College
2411 NW Carden Av.
Pendleton, OR 97801
(541) 278-5825



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to