User: d_jencks
  Date: 02/04/06 19:35:10

  Added:       src/etc/example-config postgres-service.xml
                        firebird-service.xml
  Log:
  configuration examples for the new ConnectionManager
  
  Revision  Changes    Path
  1.1                  jbosscx/src/etc/example-config/postgres-service.xml
  
  Index: postgres-service.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- ===================================================================== -->
  <!--                                                                       -->
  <!--  JBoss Server Configuration                                           -->
  <!--                                                                       -->
  <!-- ===================================================================== -->
  
  <server>
  
    <!-- ==================================================================== -->
    <!-- New ConnectionManager setup for default PostgreSQL dbs               -->
    <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
    <!-- ==================================================================== -->
  
    <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" 
name="jboss.jca:service=LocalTxCM">
      <!--make the rar deploy! hack till better deployment-->
      <depends>jboss.jca:service=RARDeployer</depends>
  
  
      <depends optional-attribute-name="ManagedConnectionFactoryName">
        <!--embedded mbean-->
        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" 
name="jboss.jca:service=LocalTxDS">
          <!--hack-->
          <depends 
optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Minerva
 JDBC LocalTransaction ResourceAdapter</depends>
  
          <!--real attributes-->
          <attribute name="ManagedConnectionFactoryProperties">
            <properties>
              <config-property>
                <config-property-name>ConnectionURL</config-property-name>
                <config-property-type>java.lang.String</config-property-type>
                
<config-property-value>jdbc:postgresql:bonneville</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>org.postgresql.Driver</config-property-value>
              </config-property>
              <config-property>
                <config-property-name>UserName</config-property-name>
                <config-property-type>java.lang.String</config-property-type>
                <config-property-value>Administrator</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></config-property-value>
              </config-property>
            </properties>
  
          </attribute>
          <attribute name="JndiName">DefaultDS</attribute>
        </mbean>
  
      <depends optional-attribute-name="ManagedConnectionPool">
        <!--embedded mbean-->
        <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" 
name="jboss.jca:service=LocalTxPool">
  
          <attribute name="MinSize">0</attribute>
          <attribute name="MaxSize">50</attribute>
          <attribute name="BlockingTimeoutMillis">5000</attribute>
          <attribute name="IdleTimeoutMinutes">15</attribute>
          <!--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)-->
          <attribute name="Criteria">ByContainer</attribute>
        </mbean>
  
      </depends>
      <depends 
optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
      <attribute name="SecurityDomainJndiName">java:/jaas/DefaultDbRealm</attribute>
      <attribute name="TransactionManager">java:/TransactionManager</attribute>
    </mbean>
  
  
  </server>
  
  
  
  1.1                  jbosscx/src/etc/example-config/firebird-service.xml
  
  Index: firebird-service.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
    <!-- ==================================================================== -->
    <!-- New ConnectionManager setup for firebird dbs using jca-jdbc xa driver-->
    <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
    <!-- ==================================================================== -->
  
  <service>
  
    <!--FBManager can be used to create and drop databases.  
      Drop is especially useful during testing, since it 
      assures a clean start next time. -->
    <mbean code="org.firebirdsql.management.FBManager" 
name="jboss.jca:service=FirebirdManager">
      <attribute 
name="FileName">/mnt/otherlinux/usr/java/jboss/co12/jboss-all/build/output/jboss-3.0.0beta2/server/default/db/fbtest.gdb</attribute>
      <attribute name="UserName">sysdba</attribute>
      <attribute name="Password">masterkey</attribute>
      <attribute name="CreateOnStart">true</attribute>
      <attribute name="DropOnStop">false</attribute>
    </mbean>
  
    <mbean code="org.jboss.resource.connectionmanager.XATxConnectionManager" 
name="jboss.jca:service=firebirdCM">
      <!--make the rar deploy - A BIG HACK till xslt based deployment is written-->
      <depends>jboss.jca:service=RARDeployer</depends>
  
      <depends optional-attribute-name="ManagedConnectionFactoryName">
        <mbean code="org.jboss.resource.connectionmanager.RARDeployment" 
name="jboss.jca:service=FirebirdDS">
          <!--more hack-->
          <depends 
optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Firebird
 Database Connector</depends>
          <attribute name="ManagedConnectionFactoryProperties">
            <properties>
              <!--config-property>
                <config-property-name>Server</config-property-name>
                <config-property-type>java.lang.String</config-property-type>
                <config-property-value>localhost</config-property-value>
              </config-property>
              <config-property>
                <config-property-name>Port</config-property-name>
                <config-property-type>java.lang.Integer</config-property-type>
                <config-property-value>3050</config-property-value>
              </config-property-->
              <config-property>
                <config-property-name>Database</config-property-name>
                <config-property-type>java.lang.String</config-property-type>
                
<config-property-value>/mnt/otherlinux/usr/java/jboss/co12/jboss-all/build/output/jboss-3.0.0beta2/server/default/db/fbtest.gdb</config-property-value>
              </config-property>
              <config-property>
                <config-property-name>UserName</config-property-name>
                <config-property-type>java.lang.String</config-property-type>
                <config-property-value></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></config-property-value>
              </config-property>
            </properties>
          </attribute>
          <attribute name="JndiName">DefaultDS2</attribute>
        </mbean>
  
      </depends>
      <depends optional-attribute-name="ManagedConnectionPool">
        <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" 
name="jboss.jca:service=FirebirdPool">
  
          <attribute name="MinSize">0</attribute>
          <attribute name="MaxSize">50</attribute>
          <attribute name="BlockingTimeoutMillis">5000</attribute>
          <attribute name="IdleTimeoutMinutes">15</attribute>
          <!--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)-->
          <attribute name="Criteria">ByContainer</attribute>
        </mbean>
      </depends>
      <depends 
optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
      <attribute name="SecurityDomainJndiName">java:/jaas/firebirdRealm</attribute>
  
      <attribute name="TransactionManager">java:/TransactionManager</attribute>
    </mbean>
  
  </service>
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to