Evan Ireland wrote:
>
> > > </concrete-example>
> > >
> >
> > If I were to invoke a bean on methodB() on BeanB from threadA I would look up the
>home
> > object for BeanB, get the bean object and then invoke the method.
> > Context initialContext = new InitialContext();
> > BeanBHome beanBHome =
>(BeanBHome)narrow(initialContext.lookup(�java:comp/env/ejb/beanB�),
> > BeanBHome.class);
> > beanB = beanBHome.findByPrimaryKey(1);
> > beanB.methodB();
> >
> > This would start a new transaction.
> > What would be wrong with that?
>
> The naming context object may be aware of whether or not it is running within
> the server (or just in a client), and the lookup call could crash the server!
> +64 4 934-5856
How would it be aware that it is running on the server? This call will be made from a
Thread
that I create, not one that the container creates.
dan
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".