[Security & JAAS/JBoss] - Re: different security domain i servlet init method (deploy
by mikala
"Wolfgang Knauf" wrote :
| Use this:
| SecurityClient client = SecurityClientFactory.getSecurityClient();
| | client.setSimple("user", "mypass");
| | client.login()
|
Thanks for reply
When I using your sample code I have the same exception:
| 13:36:54,291 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
| java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
| at org.jboss.security.auth.spi.Util.loadProperties(Util.java:198)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127)
| .
| .
| .
|
When I call from servlet init my ejb session bean (ejb version 2!!!) I have security exception (jboss using different security domain,not which I declared).
I declared security domain "mydomain" with "MyLoginModule" (in jboss-app.xml and in jboss.xml, jboss-web.xml) but jboss using "other" security domain with "UsersRolesLoginModule".
I don't know why.
When I try to call ejb session bean (version 3) from servlet init method everything is ok.
When i have running jboss and i redeploy my application (on runnig jboss I change for example application.xml) servlet init CAN CALL !!! ejb 2 method using my security domain.
I thing, problem is, with deployment order ? I don't know.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211452#4211452
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211452
17 years, 2 months
[JCA/JBoss] - Re: Integration with Oracle AQ via Sun Adapter
by ryandavid
Strangely if put the credentials into the createConnection
QueueConnection queueConnection = queueFactory.createQueueConnection("scott","mypass");
the conect is made.
In some way the credentials aren't read from the XML file.
Anayway I get then the following exception
javax.jms.JMSException: Conncetion.setExceptionListener() cannot be called on non-ACC clients
| at com.sun.genericra.outbound.ConnectionHandle.setExceptionListener(ConnectionHandle.java:166)
| at it.senato.testjms.FeederServlet.startJMSConnection(FeederServlet.java:74)
| at it.senato.testjms.FeederServlet.process(FeederServlet.java:116)
| at it.senato.testjms.FeederServlet.doGet(FeederServlet.java:95)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211432#4211432
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211432
17 years, 2 months
[Beginners Corner] - Oracle XA datasoruce with jboss
by spaluvuri
Hi,
I am trying to configure the jboss with oraclexa datasources.
I want two databases to be configured in the configuration file.
I do not know how to configure two databases in xa.
The following is my one of the datasource.
Can anyone please let me know
how can i give the configuration for the second database?
Are there any other settings do i need to take care of?
I dont know whether i am giving the correct configuration.
please let me know.
<xa-datasource>
<jndi-name>Name1</jndi-name>
<track-connection-by-tx></track-connection-by-tx>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">url1</xa-datasource-property>
<xa-datasource-property name="User">test</xa-datasource-property>
<xa-datasource-property name="Password">test123</xa-datasource-property>
<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
<!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
<!-- Checks the Oracle error codes and messages for fatal errors -->
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
<no-tx-separate-pools></no-tx-separate-pools>
</xa-datasource>
<depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager
Thanks
Sreenivas
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211423#4211423
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211423
17 years, 2 months