usually servlets would access ejb resources
you should be able to use jndi to access the ejb container
try{
Properties properties = new Properties();
//note that this client is expecting to access a JBoss app server change string and port to appropriate value for ejb container
properties.put( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" );
properties.put( Context.PROVIDER_URL, "localhost:1099" );
Context context = new InitialContext( properties );
//lookup on name as defined by the components deployment descriptor
Object objRef = context.lookup( "<ResourceName>" );
<EJBHomeInterface> home = ( FinancialAidCalculatorHome ) PortableRemoteObject.narrow( objRef, FinancialAidCalculatorHome.class );
<EJBInterface> calculator = home.create( ( String )financialAidRequestDetails.get( "applicant" ) );
}
catch( RemoteException exception ){
exception.printStackTrace();
}
catch( CreateException exception ){
exception.printStackTrace();
}
catch( RemoveException exception ){
exception.printStackTrace();
}
On Wednesday, October 23, 2002, at 05:12 PM, [EMAIL PROTECTED] wrote:
use JBOSS with embedded tomcat On Wednesday, October 23, 2002, at 05:06 PM, psalazar wrote:Greetings,
I deploy a EJB in J2EE1.3.1. Now, I would like to call it in my
JSPs/Servlets inside tomcat 4.x the EJB. How should I integrate both,
TOMCAT and J2EE, to make the Context resources of J2EE available to TOMCAT
environment?
thx,
Pedro Salazar
--
pedro salazar (pt-inovacao) <[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
