N
nimish.j.shah
I have a project where I have stateless session EJBs, and I am using
the spring framework within the EJBs by extending
AbstractStatelessSessionBean. In my spring configuration file I have
defined a JDBC Datasource by using the JndiObjectFactoryBean. This
datasource is used by many of the EJBs within the project.
My question is:
What's the best approach to setting up the EJBs and the resource
references? If I lookup the jndi directly, Websphere Application
Server throws a message in the log complaining about it. I think that
they all can potentially share the same JVM because they are all
defined in the same deployment descriptor. If I define resource
references on each of the beans for the datasource, if one of the jndi
mappings is changed for the resource reference, it may not behave as
intended because the beans that I retrieve from Spring are singletons
that are shared between the EJBs.
Any ideas or solutions would be greatly appreciated,
Nimish
the spring framework within the EJBs by extending
AbstractStatelessSessionBean. In my spring configuration file I have
defined a JDBC Datasource by using the JndiObjectFactoryBean. This
datasource is used by many of the EJBs within the project.
My question is:
What's the best approach to setting up the EJBs and the resource
references? If I lookup the jndi directly, Websphere Application
Server throws a message in the log complaining about it. I think that
they all can potentially share the same JVM because they are all
defined in the same deployment descriptor. If I define resource
references on each of the beans for the datasource, if one of the jndi
mappings is changed for the resource reference, it may not behave as
intended because the beans that I retrieve from Spring are singletons
that are shared between the EJBs.
Any ideas or solutions would be greatly appreciated,
Nimish