我有幾個@Stateful
SessionBeans註釋是這樣的:測試狀態會話Bean用的Arquillian(ARQ-jbossas遠程)
@Stateful
@Remote(AdminFacade.class)
public class TAdminFacadeBean implements TgAdminFacade,Serializable
{
...
}
現在我想的Arquillian(1.0.0.Alpha5)來測試他們,但得到如果註釋是@Stateful
或@Stateless
,如果添加了@Named
或者沒有@Remote(和implements
接口),則消息會有所不同。
重現步驟:
- 與 原型org.jboss.weld.archetypes創建新的Maven項目:的jboss-javaee6-web應用:1.0.1.CR2
- 您可能需要設置的JBoss。家(見 readme.txt文件)
- 修改的pom.xml並設置profiles.profile [ID =默認] .build.plugins.plugin [artifactId的= Maven的萬無一失,插件] .configuration.skip 假
- 啓動JBoss-6.0.0.Final
- 執行測試(應該通過):
mvn test -Parq-jbossas-remote
IST MemberRegistration
這裏測試的豆:
@Model
public class MemberRegistration
{
...
}
如果您現在更改@Model
到@Stateful
,JBoss的循環與蹤跡,與@Named @Stateful
此錯誤:
java.lang.IllegalArgumentException: ArquillianServletRunner not found.
Could not determine ContextRoot from ProtocolMetadata, please contact
DeployableContainer developer.
@Named @Stateless
:
javax.transaction.NotSupportedException: BaseTransaction.checkTransactionState
- ARJUNA-16051 thread is already associated with a transaction!
我該如何測試我的@Stateful
豆與Arquillian?