Problems with oracle datasource with UseJBossWebLoader set to true
by Jay Kraly
I have a security realm setup similar to the DatabaseServerLoginModule which
uses jndi to retrieve a datasource defined in an oracle-ds.xml file.
Everything works fine when UseJBossWebLoader is set to true, however if I
set this to false, the datasource returned by the initial context lookup is
null. I'm fairly positive that the classloader isn't able to find my
ojdbc14.jar file which contains the oracle driver when UseJBossWebLoader is
false.
I've tried moving the oracle jar out of my web-app and into the deploy/lib
directory as well as a couple other creative locations, but it still won't
load the drivers or connect to the database.
Any ideas? Thanks in advance.
-J
18 years
[Security & JAAS/JBoss] - How to use the RunAs annotation?
by rruppel
Hi all,
I have an application that already use the security system.
Now, I want to create a webservice ("Caller") that will inject and call the methods from another EJB ("Executor").
This is how I designed:
|
| @Stateless
| @SecurityDomain("myDomain")
| @RolesAllowed("ADMIN")
| class Executor implements IExecutor {
|
| void doSomething(){
|
| // execute here
| }
|
| }
|
|
|
| @WebService
| @Stateless
| @SecurityDomain("myDomain")
| @RunAs("ADMIN")
| class Caller{
|
|
| @EJB private IExecutor executor;
|
| @WebMethod
| void call(){
| executor.doSomething();
| }
|
|
| }
|
|
but when I try to acess the webmethod it gives an Exception "Authentication failure"
I am using a DatabaseServerLoginModule at login-config.xml
and it is already working if I do this:
Properties props = new Properties();
props.put(Context.SECURITY_PRINCIPAL, login);
props.put(Context.SECURITY_CREDENTIALS, pass);
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
this.ic = new InitialContext(props);
ic.lookup(beanName);
how can I access the Executor security bean trhough a webservice?
i appreciate any help
thanks,
Rafael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142142#4142142
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142142
18 years