Could you please send me your ear/war app cause I'm very interested in setting up a similar test. Can you also indicate what changes you have made to tomcat and jboss to get them running.
I only change I made is in my client file which first creates a session with jboss server. I added these couple of lines.
// must fetch these JNDI env
AppCallbackHandler handler = new AppCallbackHandler(login, password.toCharArray());
//a default login module in jboss
LoginContext lc = new LoginContext("client-login", handler);
I added auth.conf file as a system property with System.getProperty() method before I called these statements.
The auth.conf should like like this
// This file is now obsolete but is read for backward compatability
// Use the login-config.xml file instead
// $Id: auth.conf,v 1.1 2002/12/18 22:07:21 abikkina Exp $
// Very simple login module:
// any user name is accepted.
// password should either coincide with user name or be null,
// all users have role "guest",
// users with non-null password also have role "user"
// The default client login module configuration that infects the
// EJB transport layer with the application caller
// JBoss LoginModule
// Put your login modules that need JBoss here
Also added jbosssx.jar to the classpath of tomcat startup.