2 Replies Latest reply on Dec 16, 2002 2:21 PM by msnair

    Configuring user that accesses database fails.

    ieziebart

      Hi everybody i succesfully configured my datasources and jndi names but no matter what i do my ejbs get deployed to
      the wrong database or user. I'll post the most important parts of them here. I've tried many things and thoroughly searched these forums but I can't seem to solve the problem in anyways. Thanks! The important files are attached.


        • 1. Re: Configuring user that accesses database fails.
          ieziebart

          I failed attaching the files so i got the essential parts her.

          jbosscmp for default and all server deploy

          <jbosscmp-jdbc>

          java:/jdbc/TravelOnlineDB
          <datasource-mapping>Oracle8</datasource-mapping>

          <create-table>true</create-table>
          <remove-table>false</remove-table>
          <read-only>false</read-only>
          <time-out>300</time-out>
          <pk-constraint>true</pk-constraint>
          <fk-constraint>false</fk-constraint>
          <row-locking>false</row-locking>
          <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
          <read-ahead>
          on-load
          <page-size>1000</page-size>
          <eager-load-group>*</eager-load-group>
          </read-ahead>
          <list-cache-max>1000</list-cache-max>

          ....

          jbosscmp for default and all server deploy


          java:/DefaultDS
          <type-mapping>Hypersonic SQL</type-mapping>
          false
          java:/jdbc/TravelOnlineDB
          <type-mapping>Oracle8</type-mapping>
          false

          <default-entity>
          <create-table>true</create-table>
          <remove-table>false</remove-table>
          <tuned-updates>true</tuned-updates>
          <read-only>false</read-only>
          <time-out>300</time-out>
          <row-locking>false</row-locking>
          <read-ahead>false</read-ahead>
          </default-entity>


          oracle-service configuration (got it in all and default)




          <!-- Include a login module configuration named OracleDbRealm.
          Update your login-conf.xml, here is an example for a
          ConfiguredIdentityLoginModule:
          -->
          <application-policy name = "OracleDbRealm">

          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
          <module-option name = "principal">TravelOnline</module-option>
          <module-option name = "userName">JBOSS_USER</module-option>
          <module-option name = "password">JBOSS_PASSWORD</module-option>
          <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=TravelOnlineDS</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 OracleDbRealm above
          OracleDbRealm
          -->

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


          jdbc/TravelOnlineDB



          <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@localhost:1521:oracledb</config-property>
          <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
          <!--set these only if you want only default logins, not through JAAS -->
          <config-property name="UserName" type="java.lang.String">JBOSS_USER</config-property>
          <config-property name="Password" type="java.lang.String">JBOSS_PASSWORD</config-property>




          <!--Below here are advanced properties -->
          <!--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






          • 2. Re: Configuring user that accesses database fails.
            msnair

            Hello,

            Is your problem resolved???

            regards
            MS