JBoss Community

Re: Embedded AS

created by Jason Greene in JBoss AS7 Development - View the full discussion

David Lloyd wrote:

 

Well, any of the following solutions would work:

  1. Run embedded stuff in a fully modularized environment
  2. Put everything on the app classpath (and hope there's no duplicate dependencies...)
  3. Use a hybrid solution with a customized module repos where no packages are duplicated between modules and the app class path

 

Just using the app classpath is the simplest, assuming you don't hit any duplicate issues.

I had typed up this nice really well thought out post, but the forums decided to eat it. So instead I will summarize :)

 

Basically I think 2 is a non-option as it will be brittle and it directly contradicts with our hide internal impl requirement. Not to mention if we are testing a client server protocol we actually do want the classes to be in separate loaders.

 

The duplicate packages should be ok in the case of having the client protocol stuff on the classpath as that would only be used within the app classpath classloader. Really the only difference between 1 and 3 is whether or not the user has to define a module definition listing their package (3 discovers packages via the system module). So IMO 3 is the best long term option.

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community