0 Replies Latest reply on Nov 18, 2002 8:30 AM by Anna

    Switching between DefaultDS and InformixDS

    Anna Newbie

      I'm using Scott Stark 's JAAS example .
      When I'm trying to run this examples using InformixDS
      I've got :

      2002-11-18 15:52:51,077 ERROR [org.jboss.ejb.plugins.SecurityInterceptor] Authentication exception, principal=stark
      2002-11-18 15:52:51,077 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, causedBy:
      java.lang.SecurityException: Authentication exception, principal=stark
      at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:173)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at ......

      But the same code works properly when I'm using DefaultDS (Hypersonic).


      My informix-service.xml is:

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->



      <!-- ==================================================================== -->
      <!-- ConnectionManager setup for local informix dbs -->
      <!-- Thanks to Larry Sanderson (larrys@mrstock.com) -->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- ==================================================================== -->



      <!--Include a login module configuration named InformixDbRealm.
      Update your login-conf.xml, here is an example for a
      ConfiguredIdentityLoginModule:

      <application-policy name = "InformixDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">informix</module-option>
      <module-option name = "userName">informix</module-option>
      <module-option name = "password">inf123</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=InformixDS</module-option>
      </login-module>

      </application-policy>

      NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
      module-option name = "managedConnectionFactoryName"
      must match the object name of the ConnectionManager you are configuring here.

      uncomment out this line if you are using the Informix DbRealm above-->
      InformixDbRealm



      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      InformixDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:informix-sqli://128.127.208.2:1526/connectto:informixserver=ol_linux</config-property>
      <config-property name="DriverClass" type="java.lang.String">com.informix.jdbc.IfxDriver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">informix</config-property>
      <config-property name="Password" type="java.lang.String">inf123</config-property>


      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper


      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer


      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager

      java:/TransactionManager
      <!--make the rar deploy! hack till better deployment-->
      jboss.jca:service=RARDeployer







      Have any ideas?
      Thanks.