Hello!
I use EJB for managing server state for client side regression tests. When I
run client side tests with Arquillian, all test pass, but I receive exception
on deployment time: https://pastebin.com/ybC8Hs1a
Why I recevie this exception?
This my remote interface:
@Remote
public interface ServerState {
public void load(Collection<StateAction> stateActions) throws Exception;
public void clean();
public void setSession(String sessionId, int sessionMaxInactiveInterval);
}
This my EJB:
@Stateful(mappedName = "MyServer")
public class ServerStateImpl implements ServerState {
@Override
@Transactional
public void load(Collection<StateAction> fromClient) throws Exception {
// do something
}
@Override
@Transactional
public void clean() {
// do something
}
@Override
public void setSession(String sessionId, int sessionMaxInactiveInterval) {
// do something
}
public void otherMethod() {
// do something
}
}
This my lookup code:
@RunWith(Arquillian.class)
@RunAsClient
public class MyTest {
private ServerState serverState;
@Deployment(testable = false)
public static WebArchive createDeployment() {
...
}
@Before
public void init() {
Properties p = new Properties();
p.put("java.naming.factory.initial",
"org.apache.openejb.client.RemoteInitialContextFactory");
InitialContext ctx = new InitialContext(p);
myServer = (ServerState) ctx.lookup("MyServer");
}
...
}
Thank you!
--
WIth best regards,
Makarov Alexey