Folks
I've setup OpenEJB in Netbeans so that we can run it and debug it using the Embedded configuration. It worked fine until we tried to add authentication.
When we run it as a standalone server, we can edit the security users and groups lists and it works:
${openejb.base}/conf/login.config
${openejb.base}/conf/users.properties
${openejb.base}/conf/groups.properties
However, we couldn't find a way to specify those 3 files when using the OpenEJB embedded configuration (a Netbeans project). It seems that OpenEJB doesn't see them wherever they are placed. The method calls always fail with:
*javax.security.auth.login.FailedLoginException: User does not exist*
Does anybody know how to specify what users and groups OpenEJB should use when running in embedded mode?
Here is the Netbeans project structure
projectName/src - all source files projectName/lib - jars: database driver, all OpenEJB libraries projectName/lib/conf - security files
Thanks,
Luís
You should use LocalInitialContext properties to tell OpenEJB where the configuration files are. In our setup we configured the ant script to copy the following files to projectName/build after compiling the project:
Then you have to tell OpenEJB where to find them:
Now you can run OpenEJB inside NetBeans, Eclipse or any IDE. Additionally, you can use the ant script to run all unit tests from the command line, too.