I'm using JBoss (MX MicroKernel) [3.2.5 (build: CVSTag=JBoss_3_2_5 date=200406251954)]
login-config.xml
<application-policy name = "HsqlDbRealm2">
| <authentication>
| <login-module code = "org.jboss.resource.security.CallerIdentityLoginModule"
flag = "required">
| <module-option name = "userName">sa</module-option>
| <module-option name = "password"></module-option>
| <module-option name =
"managedConnectionFactoryName">jboss.jca:servce=LocalTxCM,name=DefaultDS</module-option>
| </login-module>
| </authentication>
| </application-policy>
I make Login ()
con2 = null;
| ps = null;
| name = "JB";
| passwordStr = "JB";
| password = passwordStr.toCharArray();
| lc = null;
| try {
| AppCallbackHandler handler = new AppCallbackHandler(name,
password);
| lc = new LoginContext("HsqlDbRealm2", handler);
| System.out.println("Created LoginContext");
| lc.login();
| System.out.println("Logged in.");
| Iterator it = lc.getSubject().getPrincipals().iterator();
| while(it.hasNext()) {
| Object o = it.next();
| System.out.println("principle: "+o.getClass().getName()+ "
"+o);
| }
| }
| catch (Exception le) {
| System.out.println("Login failed");
| le.printStackTrace();
| }
Has received ERROR
12:08:14,811 ERROR [AbstractPasswordCredentialLoginModule] The ConnectionManager
mbean: jboss.jca:servce=LocalTxCM,name=DefaultDS specified in a
ConfiguredIdentityLoginModule could not be found. ConnectionFactory will be unusable!
| 12:08:14,811 INFO [STDOUT] Login failed
| 12:08:14,811 INFO [STDOUT] javax.security.auth.login.LoginException:
java.lang.IllegalArgumentException: Managed Connection Factory not found:
jboss.jca:servce=LocalTxCM,name=DefaultDS
Instead of DefaultDS tried to put others
<datasources>
| <local-tx-datasource>
| <jndi-name>OracleDS</jndi-name>
| <connection-url>jdbc:oracle:thin:@D77777:1521:olg1</connection-url>
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
| <user-name>JB</user-name>
| <password>JB</password>
|
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| </local-tx-datasource>
|
|
| <local-tx-datasource>
| <jndi-name>OraDSIG2</jndi-name>
| <connection-url>jdbc:oracle:thin:@D77777:1521:olg1</connection-url>
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
| <blocking-timeout-millis>5000</blocking-timeout-millis>
| <idle-timeout-minutes>15</idle-timeout-minutes>
| <max-pool-size>20</max-pool-size>
| <min-pool-size>10</min-pool-size>
| <!-- Use the security domain defined in conf/login-config.xml -->
| <security-domain>OraIG_DB</security-domain>
| </local-tx-datasource>
, but has received the same mistake.
Where I have made a mistake?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3849067#3849067
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3849067
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user