1 2 3 4 5 Previous Next 72 Replies Latest reply: May 14, 2010 11:40 AM by Jesper Pedersen Go to original post RSS
  • 45. Re: JcaXAResourceRecovery
    Jesper Pedersen Master

    Jonathan, I've added the following interface to the JCA SPI in jboss-integration:

    org.jboss.jca.spi.xa.XAResourceWrapper

    with the methods getEISProductName() and getEISProductVersion(). So you can depend on this interface for AS-5.0.

    For AS-4.x support you still need to keep the JcaXAResourceWrapper support.

    The JNDI name lookup functionality will be added to a MC bean in the new POJO implementation.

    The user can now get basic information about where to look for the source of the error.

    Let me know what you think.

  • 46. Re: JcaXAResourceRecovery
    Jonathan Halliday Master

    Now that AS trunk uses JBossTS 4.4.0.CR1, the transaction maanger side of the XAResourceRecoveryRegistry is available. The JCA now probably needs updating to register suitable XAResource(s) for any datasources.

    Here is a trivial usage example to get you started:

    import org.jboss.tm.XAResourceRecovery;
    import javax.transaction.xa.XAResource;
    
    public class TestASXAResourceRecovery implements XAResourceRecovery
    {
     public XAResource[] getXAResources()
     {
     System.out.println("you should see this on every recovery pass i.e. every two minutes");
     return new XAResource[0];
     }
    }
    


    deploy/test-beans.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <deployment xmlns="urn:jboss:bean-deployer:2.0">
    
    <bean name="MyConnectionManager" class="TestASXAResourceRecovery">
     <install bean="TransactionManager" method="addXAResourceRecovery">
     <parameter><this/></parameter>
     </install>
     <uninstall bean="TransactionManager" method="removeXAResourceRecovery">
     <parameter><this/></parameter>
     </uninstall>
    </bean>
    
    </deployment>
    


  • 47. Re: JcaXAResourceRecovery
    Jonathan Halliday Master

     

    "jesper.pedersen" wrote:
    Jonathan, I've added the following interface to the JCA SPI in jboss-integration:

    org.jboss.jca.spi.xa.XAResourceWrapper

    with the methods getEISProductName() and getEISProductVersion(). So you can depend on this interface for AS-5.0.


    Thanks. When is that actually going into AS 5.0 trunk? I can build the integration module trunk and drop it into the AS by hand, but it's a bit of a pain for testing against.

  • 48. Re: JcaXAResourceRecovery
    Jonathan Halliday Master

    Also any reason why it's in the JCA SPI rather than the transactions SPI? XAResource is a transaction thing, not a JCA specific thing. What happens when some non-JCA POJO component wants to use it? JBoss cache may be an example - it's not a JCA connector as far as I know. It makes no odds to me, since JBossTS won't have a compile time dependency on it anyhow, I'm just curious.

  • 49. Re: JcaXAResourceRecovery
    Jesper Pedersen Master

    Thanks for the information, Jonathan.

    I have moved XAResourceWrapper to the transaction SPI instead as it can be used by other modules than the JCA implementation. Also I have renamed the methods to make them more non-EIS.

    I have started a thread on jboss-development on the integration of the jar files from this module. Once we have agreement on the deployment I'll commit the code for the connector module.

  • 50. Re: JcaXAResourceRecovery
    Jonathan Halliday Master

    Hi Jesper

    What's the status on this? I don't see the datasource deployers using the new API to register for recovery yet. Is it still planned for AS 5.0.GA or coming later?

  • 51. Re: JcaXAResourceRecovery
    Jesper Pedersen Master

    I currently have it on my TODO for the EAP-5 release

  • 52. Re: JcaXAResourceRecovery
    Jesper Pedersen Master

    We will go with Adrian's design on this.

     

    We will start with adding the new recover properties to the xa-datasource and thereby create a jboss-ds_5_1.dtd for EAP. These properties will be optional if the specified user/domain doesn't have the permissions needed.

     

    Next will be implementing the XA recovery interface for the deployments and the TxConnectionManager - we will see if we need a property to split the connection manager into a "standard" part and a "recovery" part - more on that later.

     

    I'll update the thread once I have the location for the code and the branch.

     

    Testing this functionality will be a big task - Ivo, you are manually testing the current functionality in the EAP branch, correct ? Have you tried to test against pure Java databases, like Derby ?

  • 53. Re: JcaXAResourceRecovery
    Ivo Studensky Newbie

    The crash recovery tests are automated in the AS testsuite as an optional task, see testsuite/imports/config/tests-crash-recovery.xml and JBAS-7219. They are included in both, the EAP5 branch and trunk.

    Currently, the recovery tests run against selected databases inside the redhat network, namely PostgreSQL 8.2 and 8.3, Oracle 10g and 11g, Sybase 15, DB2 9.7, MSSQL 2005 and 2008, MySQL 5.0 and 5.1, i.e. supported db's for EAP. They don't use Derby at the moment.

     

    The current tests involve only XA-datasource for each supported db in crash recovery and there is a question what other types of JCA XA resources they could involve into the recovery testing. It is subject for discussion.

  • 54. Re: JcaXAResourceRecovery
    Jesper Pedersen Master

    Ok, we will go with the current test cases you have for now. But I think it would be a good idea to see if we can get the test automatted as part of the main AS test suite - without depending on the Red Hat network.

     

    Code location

    git@github.com:jesperpedersen/eap.git
    

     

    on branch "xaresourcerecovery".

     

    We will move back to svn.jboss.org once the branch is open.

  • 55. Re: JcaXAResourceRecovery
    Jesper Pedersen Master

    Jonathan, what are your plans for TS in EAP ? We are currently at 4.6.1.GA_CP04.

     

    Also I need to lookup the RecoveryManagerService using JMX - or through one of the TM services registered in JMX, since this is the JMX based JCA container.

     

    Any API to do that - or it is a "Feature Request" for the RecoveryManagerService implementation ?

     

    For the new JCA container we will just inject the RecoveryManager bean... but we can discuss that once we get to it.

  • 56. Re: JcaXAResourceRecovery
    Jesper Pedersen Master

    [09:00] <jhalliday> I don't follow why you need a handle on the RecoveryManagerService in the 5 branch, since it does not exist there.

    [09:01] <jpederse> jhalliday: so you don't plan to update the EAP branch to 4.9.0+ ?

    [09:01] <jhalliday> no

    [09:02] <jpederse> jhalliday: so where is XAResourceRecovery and XAResourceRecoveryRegistry implemented ?

    [09:05] <jhalliday> TransactionManagerService.addXAResourceRecovery

  • 57. Re: JcaXAResourceRecovery
    Jesper Pedersen Master

    Jonathan, the addXAResourceRecovery() / removeXAResourceRecovery() methods are not exposed through JMX on jboss:service=TransactionManager.

     

    Could you add those ?

  • 58. Re: JcaXAResourceRecovery
    Jonathan Halliday Master

    huh? Why do you need JMX access to them? AS 5 is MC based - just inject the TransactionManager bean and cast to XAResourceRecoveryRegistry

  • 59. Re: JcaXAResourceRecovery
    Jesper Pedersen Master

    Yeah, but the JCA container is still based on the old JMX kernel, so the only thing I have access to in the component is the ObjectName.