Kevin,
If it's OK to create one session EJB for the lifetime of a generator, do this
in configure() method;
If you need to create/obtain EJB for each request (it may be the case with
session stateful EJB), you can do this in setup() method.
Look at TraxTransformer as it have both of these methods.
Don't forget to implement recycle() to do cleanup between requests.
Vadim
> -----Original Message-----
> From: Kevin O'Neill [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 25, 2001 12:44 AM
> To: [EMAIL PROTECTED]
> Subject: Generators
>
>
> I'm in the process of creating a cocoon 2 generator and I have a couple
> of questions that I don't seem to be able to find the answers to in the
> documentation, if this is just a matter of my eyes being blind to the
> documentation then please tell me to RTFM (with a reference if
> possible).
>
> I have a generator that calls an EJB Session Bean to do some processing
> and returns me a JDOM document that I then trigger the SAX events from.
>
> I want to create the reference to the home interface once when the
> object is fist initialised and put into the pool. At the moment (as I
> can't seem to locate the correct method to implement/override) I'm
> initialising the reference on object creation using a parameter from a
> properties file. I'd rather do this in some sort of lifecycle event a
> little like ejbCreate and read the home interface jndi location from a
> parameter in the sitemap file.
>
> Can anybody point me in the right direction, at some sample code?
>
> k.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]