JBoss6 AS EJB3StandaloneBootstrap& EJB3StandaloneDeployer

时间:2010-08-09 21:37:37

标签: jboss ejb-3.1

目前我正在将JBoss 4项目迁移到JBoss 6.我确实错过了EJB3StandaloneDeployer和EJB3StandaloneBootstrap的替代品。

是否有任何新的来源可以提供这两个类的功能?

THX

1 个答案:

答案 0 :(得分:1)

我的猜测是EJB3StandaloneDeployerEJB3StandaloneBootstrap被标准EJBContainer API取代。这是一个例子:

// Instantiate an embeddable EJB container and search the
// JVM class path for eligible EJB modules or directories
EJBContainer ejbC = EJBContainer.createEJBContainer();

// Get a naming context for session bean lookups
Context ctx = ejbC.getNamingContext();

// Retrieve a reference to the AccountBean using a
// portable global JNDI name (more on this later!)  
AccountBean ab = (AccountBean) 
    ctx.lookup("java:global/account/AccountBean");

// Test the account
Account a1 = ab.createAccount(1234);

...

// Shutdown the embeddable container
ejbC.close();    

JBoss也启动了你可能感兴趣的Arquillian

另见