1 2 Previous Next 16 Replies Latest reply on Nov 19, 2003 6:32 AM by test

    JBoss 3.0 and Oracle

    l.g.

      As I understand configuration files are changed since
      JBoss 2.4.
      Question: How to configure Oracle with JBoss 3.0?
      Examples would be helpful...

      TIA.

        • 1. Re: JBoss 3.0 and Oracle
          davidjencks

          This is one topic on which the free manual is up to date.

          • 2. Re: JBoss 3.0 and Oracle
            alice_adler01

            I tried to do the settings according to the documentation but I get DeploymentException when deploying the bean "OracelDS not found".

            Plz help!

            Here are the files:

            jboss_home/conf/default/standardjaws.xml:

            OracleDS
            <type-mapping>Oracle8</type-mapping>
            false

            jboss_home/conf/default/standardjbosscmp-jdbc.xml:

            OracleDS
            <type-mapping>Oracle8</type-mapping>
            false

            jboss_home/deploy/oracleds-service.xml:

            <?xml version="1.0" encoding="UTF-8"?>
            <!-- $Id: oracle-service.xml,v 1.3 2002/03/01 00:02:00 d_jencks Exp $ -->

            <!-- =====================================================================-->
            <!-- oracleds-service.xml -->
            <!-- JBoss v3.0alpha (november 23, 2001) ORACLE thin driver Configuration -->
            <!-- tested against ORACLE v8.x -->
            <!-- ==================================================================== -->
            <!-- -->
            <!-- please put jdbc driver (in this case classes12.zip) in jboss_home/lib/ext -->
            <!-- please put this file (oracleds-service.xml) under jboss_home/deploy -->
            <!-- Contributed by Christian Biasuzzi bic@quinary.com-->
            <!-- ===================================================================== -->






            ConnectionURL=jdbc:oracle:thin:@localhost:1521:oracle
            DriverClass=oracle.jdbc.driver.OracleDriver

            OracleDS
            java:/TransactionManager
            <depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
            <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory
            #
            #Wed Aug 15 16:17:29 EDT 2001
            BlockingTimeoutMillis=50000
            IdleTimeoutMinutes=30
            MaxSize=10
            CleanupIntervalMinutes=10
            MinSize=0
            MaxIdleTimeoutPercent=1.0


            org.jboss.resource.security.ManyToOnePrincipalMapping

            userName=scott
            password=tiger



            thanks a lot.

            • 3. Re: JBoss 3.0 and Oracle
              philc

              I have the same problem. Did you solve it?

              • 4. Re: JBoss 3.0 and Oracle
                netchhe

                And i have the exactly same problem.

                Runs under Beta, doesn't run anymore under RC1. Any hints?

                • 5. Re: JBoss 3.0 and Oracle
                  l.g.
                  • 6. Re: JBoss 3.0 and Oracle (RC1)
                    g_andre

                    Just got the same pb with mysql when upgrading from 3 beta to RC1. The new conf files are there:
                    http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/example-config/
                    I had to change conf/login-config as well ( check comments in jdatastore-service.xml).
                    Hope it helps.

                    • 7. Re: JBoss 3.0 and Oracle (RC1)
                      davidjencks

                      For a little more info...
                      http://main.jboss.org/forums/thread.jsp?forum=67&thread=13366

                      (The free online manual is no longer up to date;-(

                      • 8. Re: JBoss 3.0 and Oracle
                        echofloripa

                        I think not look at it :

                        Introduction
                        Access to Resource Managers
                        THIS CHAPTER IS PRIMARILY RELEVANT TO JBOSS 3 (RABBITHOLE) VERSIONS BEFORE RC1

                        THE MBEANS FOR CONFIGURING DATASOURCES/ADAPTERS IN RC1 ARE COMPLETELY DIFFERENT FROM THOSE DESCRIBED HERE. FOR DESCRIPTIONS OF EACH ATTRIBUTE, CONSULT THE GENERATED JMX-API DOCUMENTATION.

                        You will probably have to generate this documentation yourself. Check out jboss-all and run build/build.sh all. You should find a build/output/jboss-###/docs/jmx-api directory, and following the package structure to org.jboss.resource.connectionmanager should reveal the documentation .

                        • 9. Re: JBoss 3.0 and Oracle
                          davidjencks

                          In the future, please indicate what you are quoting from. I can tell only because I wrote everything relating jca on the jboss site and happen to remember where your quote comes from. As I indicated, the free manual is not up to date, and as you quote it, everyone can now see that clearly.

                          The example configurations are now in the binary rc2 download, as is the jmx-api documentation. Look under docs/examples/jca for the examples and docs/jmx-api for the generated documentation.

                          • 10. Re: JBoss 3.0 and Oracle
                            echofloripa

                            It is missing some more detailed explanation about which files are needed to be changed, where to put the oracle-service.xml (i put in the deploy dir with the ear, but could it be put inside ear?) and whatelse file to change, if any, and what consequence in not change any other file. I configure my oracle-service.xml according to some threads about oracle conf. and configured jaws.xml to use OracleDS (same as name in the mbean conf.), but it keep using the HSQL db.
                            in the ex. file conf. (oracle-service.xml) it saws :

                            <!--Be sure to set up an OracleDbRealm (similar to DefaultDbRealm) in the auth.conf file if you want to use container managed security -->

                            bu theresn't no DefaultDbRealm in auth.conf, could someone explain that better??

                            Below goes the oracle-service.xml and jaws.xml :

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

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



                            <!-- ==================================================================== -->
                            <!-- ConnectionManager setup for Oracle dbs -->
                            <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
                            <!-- Thanks to Steven Coy -->
                            <!-- ==================================================================== -->


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


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

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

                            <!--real attributes-->


                            <config-property>
                            <config-property-name>ConnectionURL</config-property-name>
                            <config-property-type>java.lang.String</config-property-type>
                            <config-property-value>jdbc:oracle:thin:@10.1.0.26:1521:oradev</config-property-value>
                            </config-property>
                            <config-property>
                            <config-property-name>DriverClass</config-property-name>
                            <config-property-type>java.lang.String</config-property-type>
                            <config-property-value>oracle.jdbc.driver.OracleDriver</config-property-value>
                            </config-property>
                            <!--It is recommended that you use the JAAS security facilities
                            instead of exposing your security info here-->
                            <config-property>
                            <config-property-name>UserName</config-property-name>
                            <config-property-type>java.lang.String</config-property-type>
                            <config-property-value>aluno1</config-property-value>
                            </config-property>
                            <config-property>
                            <config-property-name>Password</config-property-name>
                            <config-property-type>java.lang.String</config-property-type>
                            <config-property-value>aluno1</config-property-value>
                            </config-property>



                            OracleDS



                            <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

                            <!--Be sure to set up an OracleDbRealm (similar to DefaultDbRealm)
                            in the auth.conf file if you want to use container managed security -->
                            <!--comment out this line if you want component managed security or want
                            to use the default values in the ManagedConnectionFactoryProperties -->
                            <!-- attribute name="SecurityDomainJndiName">java:/jaas/OracleDbRealm</attribute -->

                            java:/TransactionManager







                            obs: i could a kind of simpler to create a datasource : )

                            Thanks in advance

                            Emerson Cargnin
                            SICREDI - POA
                            BRAZIL

                            • 11. Re: JBoss 3.0 and Oracle
                              davidjencks

                              It is really hard to find every thread where someone is complaining that mismatched configuration and server don't work, but I am doing my best.

                              I will not support anything before jboss rc2. I recommend that you stop wasting your time also and move to rc2 now. Start with the config files in the rc2 binary download.

                              • 12. Re: JBoss 3.0 and Oracle
                                echofloripa

                                sorry telling that just now, but i'm already using RC2 dist.

                                by the way , when i put the oracle xml file conf. jboss gives me the following warn :

                                WARN [ServiceController] jboss.jca:service=LocalTxDS,name=OracleDS does not implement any Service methods

                                But i see this in other parts of startup.

                                • 13. Re: JBoss 3.0 and Oracle
                                  davidjencks

                                  The warnings about "no service methods" are irrelevant.

                                  The config file you quote previously does not look to me as if it is based on the rc2 oracle-service.xml.

                                  • 14. Re: JBoss 3.0 and Oracle
                                    echofloripa

                                    here goes the new version, it doens't work either, i don't want to use realm and JAAS (at least now), just want JBoss to use Oracle to persist the Entity beans.
                                    The only think I can do is getting a connection from the datasource (using username and password hardcoded as "getConnection("user","pass")", otherwise it gives an error)

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

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



                                    <!-- ==================================================================== -->
                                    <!-- ConnectionManager setup for Oracle dbs -->
                                    <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
                                    <!-- Thanks to Steven Coy -->
                                    <!-- ==================================================================== -->




                                    <!-- 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">yourprincipal</module-option>
                                    <module-option name = "userName">yourusername</module-option>
                                    <module-option name = "password">yourpassword</module-option>
                                    <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</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.
                                    -->
                                    <!--comment out this line if you want component managed security or want
                                    to use the default values in the ManagedConnectionFactoryProperties
                                    OracleDbRealm -->

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


                                    OracleDS



                                    <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin:@10.1.0.26:1521:oradev</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">aluno1</config-property>
                                    <config-property name="Password" type="java.lang.String">aluno1</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)-->
                                    ByNothing



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

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

                                    java:/TransactionManager

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






                                    jaws.xml :


                                    java:/OracleDS
                                    <type-mapping>Oracle8</type-mapping>
                                    true
                                    [...]

                                    THe strange thing is that JBoss don't give me any error for this jaw's conf.


                                    1 2 Previous Next