--- "Hunsberger, Peter" <[EMAIL PROTECTED]>
schrieb: > > I don't care for JBoss that much but
would like to
> > have J2EE for business logic scalability. My BIG
> > question is - HOW DO YOU ACCESS EJBs FROM COCOON?
> > Please, give us your secrets!
>
> Didn't I just answer this? Nothing special is
> required:
Sorry I got lasting on this, I answered before reading
your next reply.
I think this is what I needed to try it out, I promise
to get back to you with my curiosity only after I get
it roughly working for me.
define your EJB's
> to jBoss as normal. Deploy the EJBs along with the
> Cocoon servlet as part of
> an ear through jBoss. The Cocoon code can then see
> anything in the EJB jar.
> We mostly use proxy code to wrap the EJB references,
> but you could call them
> directly from your code.
>
> We do cache our EJB references using code like:
>
> Foo foo =
> (Foo)EJBUtil.getFooBLHome().create().getFoo(fData);
>
> Where EJBUtil has code like:
>
> public static FooBLHome getFooBLHome()
> throws BackEndException {
> try {
> return
>
(FooBLHome)ResourceFactory.getFactory().lookUpHome(FooBLHome.class);
> } catch (NamingException e) {
> throw new BackEndException(e.getMessage());
> }
> }
>
> and ResourceFactory is just a singleton that keeps a
> hash map of the
> references. No need to jump through these hoops if
> you're not pounding on
> the EJB references a lot...
Thank you a lot,
Peter.
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de
M�chten Sie mit einem Gru� antworten? http://grusskarten.yahoo.de
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>