My approach was using J2EE1.3.1+TOMCAT 4.x. But your suggestion is
replacing J2EE1.3.1 with JBOSS. In that context, your sample refers to a
context where exists machine with a ISOLATED TOMCAT and a ISOLATED JBOSS
(that may have or not a TOMCAT embedded).
I'm telling this because your sample change some properties in JNDI. If
it was a embedded TOMCAT in JBOSS that setting properties are not
necessary, right? This is a general sample that applies in a distributed
environment (different machines), correct?
thx,
Pedro Salazar
ps. your tip was very helpful in pointing JBOSS (I didn't know it was
free), and in the code sample. Thx AGAIN!
On Wed, 23 Oct 2002 [EMAIL PROTECTED] wrote:
> by the way
> 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>
> >
>
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>