2

目前我正在将 JBoss 4 项目迁移到 JBoss 6。我确实想念 EJB3StandaloneDeployer 和 EJB3StandaloneBootstrap 的替代品。

有没有提供这两个类功能的新资源?

谢谢

4

1 回答 1

1

我的猜测是,EJB3StandaloneDeployer并被EJB3StandaloneBootstrap标准EJBContainerAPI 取代。这是一个例子:

// 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 。

也可以看看

于 2010-08-10T11:30:57.173 回答