Use JBoss + Oracle to use oracle-xa-ds.xml for Distributed Transaction Processing
We will configure two or more databases and report the following when starting JBoss:
Org. JBoss. Deployment. deploymentexception: trying to install an already registered mbean: JBoss. JCA: service = oraclexaexceptionformatter
JBoss content:
--- Incompletely deployed packages ---
Org. JBoss. Deployment. deploymentinfo @ 9dc2668e {url = file:/G:/jboss-4.2.3.GA/Server/CE/deploy/Objst1DSXA-ds.xml}
Deployer: org. JBoss. Deployment. Declare subdeployer @ 3b100c
Status: Deployment failed reason: trying to install an already registered mbean: JBoss. JCA: service = oraclexaexceptionformatter
State: Failed
Watch: file:/G:/jboss-4.2.3.GA/Server/CE/deploy/Objst1DSXA-ds.xml
Altdd: NULL
Lastdeployed: 1259016129625
Lastmodified: 1259016129609
Mbeans:
Cause:
When creating CES using the P8 Configuration Manager and executing the 'configure JDBC data sources 'task, two data source files (one Xa and one non-XA) are placed into the deployed JBoss server. the Xa data source files will contain in the following lines:
<Mbean code = "org. JBoss. Resource. Adapter. JDBC. Vendor. oraclexaexceptionformatter"
Name = "JBoss. JCA: service = oraclexaexceptionformatter">
<Depends optional-Attribute-name = "transactionmanagerservice"> JBoss: service = transactionmanager </depends>
</Mbean>
Only one Xa data source file can contain in the above entry. The problem occurs when more than one Xa data source file contains this entry.
All XA datasource files created by the P8 Configuration Manager Utility will have the "mbean code" entry in the file. This entry will need to be removed from all XA datasource files
That were created by the P8 Configuration Manager Utility after the gcd xa datasource file was created. it shoshould remain in the gcd xa data source file because that is the first XA datasource file to be created and it shoshould be in one of the files.
!!!!!!!!!!!!!!!!!!!
Solution:
Put the database files you configured like: oracle1-xa-ds.xml, oracle2-xa-ds.xml, oracle3-xa-ds.xml .......
Only one JBoss can be loaded normally. Therefore, all the later *. xml errors will be reported.
We only need to delete the 2-N *. XML content:
<Mbean code = "org. JBoss. Resource. Adapter. JDBC. Vendor. oraclexaexceptionformatter"
Name = "JBoss. JCA: service = oraclexaexceptionformatter">
<Depends optional-Attribute-name = "transactionmanagerservice"> JBoss: service = transactionmanager </depends>
</Mbean>
Restart JBoss again