Hi Romain,
I'll try to be more specific:
My job will call an EJB for processing data.
The method called is secured by @rolesallowed and, as you say, jobs are'nt
managed object. so I have to lookup the EJB.
Right now I'm trying to add credentials via:
props.put("java.naming.security.principal", "admin");
props.put("java.naming.security.credentials", "admin");
props.put("openejb.authentication.realmName", "PropertiesLogin");
props.put("openejb.ejbd.authenticate-with-request", "true");
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.LocalInitialContextFactory");
props.put(Context.PROVIDER_URL, "http://127.0.0.1:8080/tomee/ejb");
But now I get:
javax.security.auth.login.LoginException: Thread already associated with a
client identity. Refusing to overwrite.
I'm maybe barking up the wrong tree here and maybe I'll have to redesign my
older @schedule jobs to "unsecured" ejb's.
As always: Work in Progress :-)
br,
hw
--
View this message in context:
http://openejb.979440.n4.nabble.com/TomEE-and-persistent-timers-tp4666750p4666780.html
Sent from the OpenEJB User mailing list archive at Nabble.com.