I have a (Stateful-Session) EJB deployed under JRun.  It works fine and I can 
call it from a JSP that is also deployed using JRun.  I would like to be able 
to call it from other places -- my test case was from a JSP running under 
tomcat.

I copied the "ejipt_client.jar" file to the "WEB-INF/lib" directory of the 
deployed JSP.

I used the following in the JSP to attempt to get the home reference:

    Properties environment = new Properties();

    environment.setProperty( Context.INITIAL_CONTEXT_FACTORY,                 
                                        "allaire.ejipt.ContextFactory" );
  
    environment.setProperty( Context.PROVIDER_URL,                            
                                        "ejipt://penguin.mindwrap.com:2323" );
 
    Context context = new InitialContext ( environment );

    Object obj = context.lookup( "java:comp/env/ejb/OAS" );

When I run the JSP I get: the following error message when the 
"context.lookup" function is called:    

    Error: 500

    Location: /tomcat-ejb-test/TC-OASTest.jsp

    Internal Servlet Error:

    java.lang.IllegalStateException: Response has already been committed
      at org.apache.tomcat.core.HttpServletResponseFacade.sendError(
          HttpServletResponseFacade.java, Compiled Code)
      at org.apache.jasper.runtime.JspServlet.unknownException( 
         JspServlet.java, Compiled Code)
      at org.apache.jasper.runtime.JspServlet.service(
          JspServlet.java, Compiled Code)
      at javax.servlet.http.HttpServlet.service(
          HttpServlet.java, Compiled Code)
      at org.apache.tomcat.core.ServletWrapper.handleRequest(
          ServletWrapper.java, Compiled Code)
      at org.apache.tomcat.core.ContextManager.service(
         ContextManager.java, Compiled Code)
      at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.
         processConnection(Ajp12ConnectionHandler.java, Compiled Code)
      at org.apache.tomcat.service.TcpConnectionThread.run(
          SimpleTcpEndpoint.java, Compiled Code)
      at java.lang.Thread.run(Thread.java, Compiled Code)

After the "new InitialContext" call  the "context" variable does seem to 
contain a reference to a "javax.naming.InitialContext".

Testing indicates that something in JRun is listening to port 2323.

Any help or example code would be greatly appreciated.
--
Craig
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the 
body.

Reply via email to