You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Jeremy Levy <je...@yahoo.com> on 2001/11/26 20:49:25 UTC

SOAP and JBoss

Hi, I have SOAP working great with Tomcat/Apache my RPC's are working
perfectly... I would like to now add database interaction to my serverside
classes.... In my enviroment, apache/tomcat can not talk directly to the DB,
rather it has to go though JBoss.  I have been using
http://home01.wxs.nl/~cancr001/tomcat_jboss.html to set up JBoss with
tomcat... Has anyone set up JBoss with tomcat, if so are they any good docs
that you can point me to?  The item where I would like some clarification
is:

In the document mentioned above it states:

Finally make sure that your JSP/Servlet code references the properties set
in <app home>/WEB-INF/web.xml using the
getServletContext().getInitParameter() method. The following code-snippet
demonstrates how this method can be used in a JSP/Servlet:

// Set properties
Properties newProps = System.getProperties();
newProps.put ("java.naming.factory.initial",
getServletContext().getInitParameter ("java.naming.factory.initial"));
newProps.put ("java.naming.provider.url",
getServletContext().getInitParameter ("java.naming.provider.url"));
System.setProperties (newProps);
AnEJB gocha = null;

// Obtain a remote reference
try {
  InitialContext jndiContext = new InitialContext();
  Object ref = jndiContext.lookup("ejb/AnEJBHome");
  AnEJBHome home = (AnEJBHome) PortableRemoteObject.narrow (ref,
AnEJBHome.class);
  gocha = home.create();
}

catch (Exception e) {
  System.err.println ("An exception occurred while obtaining a remote
reference:");
  System.err.println (e.toString());
}




my question is, do I do this in the SOAP servlet... rpcrouter?

Thanks



Jeremy


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com