Thom Park wrote:
> Hi All,
>
> I'm attempting to understand how hte J2EEAdapter and J2EEinterceptor
> codeline works. More specifically I'm trying to understand how
> the J2EE stuff plugs in to a vanilla Tomcat 3.2 instance. My end goal
> is to plug the standalone Tomcat into a J2EE environment and I'm not
> sure where to begin as the code is pretty devoid of comments on how it's
> put together.
>
> I understand that the failing is mine (being unable to piece together
> this from the source code) however can anyone point me in the correct
> direction such that I can understand what role the J2EEAdapter &
> J2EEInterceptor perform in the running tomcat environment.
>
The J2EE code you are looking at is designed to support Tomcat itself being
integrated inside a J2EE server. (It was required because a modified
version of Tomcat 3.0 is the servlet container inside the J2EE 1.2 reference
implementation). It won't do you any good by itself.
>
> I can't seem to find any references in the web.xml loading code other
> than env-entry - does this mean that the defaul tomcat has no support
> ofr ejb-ref and resource-ref?
>
That is correct for Tomcat 3.x. In Tomcat 4.0, code to process these
entries, and create the corresponding JNDI initial context, has been added
in the last couple of days (since milestone 4).
>
> As far as I can tell the code that does support these seems to be
> custom-coded for the webservice bundled with the J2EE SDK so I can't
> honestly tell what works with the standalone tomcat and what doesn't.
>
> Sorry if I'm not being clear - any help & guidance would be gratefully
> appreciated. I expect I'll have a better understanding of this tomorrow
> after I've trawled through the code some more.
>
> -Thom
>
> p.s. If this is the wrong email list to mail to please accept my
> apologies and perhaps some kind soul can point me at the correct one!
If your goal is to write servlets that talk to EJBs, what you want to do is
decide what EJB server you want to use, then use its documentation to
describe how servlets can be used to access them. Some engines (like Jonas,
I think) have Tomcat integrated inside. I've seen notes that others support
Tomcat running in a separate process but still accessing the EJBs.
Craig McClanahan