I have a data access EJB project that has a number of EJB’s I want to use this module across a number of projects to make use of some common classes however, I don’t always want the EJB’s in the project to be loaded. More specifically I only want certain EJB’s to be loaded for certain projects. Other than splitting the projects in to multiple EJB modules and have the common classes in a core library is there anything I can do.
Most of the EJB’s in the project at @Singleton and initialised @Startup.
Thanks,
James
James, I think I do understand want you want to achive, but this does not make sense to me. If you want to share certain classes without sharing the EJBs itself, you should create a Utility JAR containing those classes you want to share. This is not only a workaround, but a best-practice as it decouples things.