[jboss-dev-forums] [Design of POJO Server] - Re: The DeploymentManager and ProfileService

scott.stark@jboss.org do-not-reply at jboss.com
Wed Feb 4 15:55:27 EST 2009


I'm running into a few issues with trying to run an embedded AS testcase given just this type of unit test code:


  | @Profile(name="ejb3")
  | @ProfileDeployment(name="EmbeddedSessionUnitTest", pkg="org.jboss.test.ejb3.basic")
  | public class EmbeddedSessionUnitTest
  |    extends EmbeddedTestCase
  | {
  |    
  |    public EmbeddedSessionUnitTest(String name)
  |    {
  |       super(name);
  |    }
  | 
  |    public void testSession()
  |       throws Exception
  |    {
  |       InitialContext ctx = getInitialContext();
  |       String jndiName = "ejb3/basic/SimpleSessionBean";
  |       Object ref = ctx.lookup(jndiName);
  |       SimpleSession test = (SimpleSession) ref;
  |       test.ping();
  |    }
  | }
  | 
  | @Profile(name="naming")
  | public class EmbeddedTestCase
  |    extends AbstractTestCaseWithSetup
  | {
  | ...
  | }
  | 
  |   | 
  |   | where the notion is that the test classes require "ejb3" and "naming" subprofiles, and has a dynamic deployment that will be made up of the ejbs visible in the "org.jboss.test.ejb3.basic". This is the coarsest description of a subprofile. More generally this would include some criteria expression.
  |   | 
  |   | Now the issues are:
  |   | 1. The JBossEmbeddedAS needs to accept richer input to allow metadata such as the inmemory deployment information.
  |   | https://jira.jboss.org/jira/browse/EMB-19
  |   | 
  |   | 2. I'm having some class loading problems with CNFEs, CNFs for some of the security and ejb3 classes when using JBossEmbeddedAS to boot the server/embedded profile in jbossas trunk. Still need to drill into that.
  |   | 
  |   | 3. The ProfileServiceBootstrap needs to call the AbstractBootstrapProfileFactory createProfile(Map profiles, List subProfiles, ProfileKey key, List profileMetaData) method as there may be ProfileMetaData coming in from the bootstrap environment. 
  |   | 
  |   | 4. We need the ability to have multiple ProfileFactorys that are either associated with a ProfileMetaData or tolerant of ProfileMetaData they don't understand so that a mixture of profile implementations can be built up.
  |   | 
  |   | I'm working on 3-4 today.
  |   | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207124#4207124

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207124



More information about the jboss-dev-forums mailing list