3 Replies Latest reply: Apr 23, 2012 10:38 PM by Tomohisa igarashi RSS

Naming context to be used by SwitchYardTestKit

Tomohisa igarashi Expert

I'm now struggling with IronJacamar embedded to integrate into JCAMixIn and hit a problem. IronJacamar embedded needs naming server that supports javax.naming.Reference binding, and our MockInitialContextFactory doesn't.

 

There are 4 options.

 

  • Use jnpserver(default option for IronJacamar embedded)

We can't choose this option. jnpserver is using old jboss-logging-spi 2.x conflicts with other component which uses jboss-logging 3.x like BPEL component.

(cf. https://community.jboss.org/thread/196259 https://community.jboss.org/thread/198717)

 

  • Implement Reference binding logic into MockInitialContextFactory

I thought about this with taking a look at existing code, but it doesn't look dumb easy.

 

  • boot the JBoss AS7 naming component in the SwitchYardTestKit

I'm now thinking about this. According to the org.jboss.as.naming.subsystem.NamingSubsystemAdd.java, some initial setup are needed.

 

  • decide not to use IronJacamar embedded in the testcases

Just create MockResourceAdapter, MockTransactionManager and etc for testcases. And we always need JBoss AS7 instance to test JCA gateway further.

 

Could you share any thoughts about this, please?

 

Thanks,

Tomo

  • 1. Re: Naming context to be used by SwitchYardTestKit
    Tomohisa igarashi Expert

    After got comments from Jesper and a bit more thoughts, 4th option sounds better to me - unit testcases should focused on the SwitchYard application testing, and control via MockResourceAdapter instead of connecting to the EIS actually. We can use Arquillian and AS7 when we need to deploy the ResourceAdapter and connect to the EIS actually. That is something for the integration testcases which may be in the release repo.

  • 2. Re: Naming context to be used by SwitchYardTestKit
    Keith Babo Master

    Sorry to force you to answer yourself, Tomo. :-)

     

    I think there are two different test scenarios for JCA here:

     

    Scenario 1 : our internal testing of the JCA gateway component.  Seems to me this should use embedded IronJacamar and several types of resource adapters.  JMS certainly and maybe a test one that's used in IronJacamar or one we develop on our own.  The purpose of these tests is to validate our implementation of a JCA gateway.

     

    Scenario 2 : users developing applications which use the JCA gateway.  This is where a JCAMixIn comes into play.  The main scenario I can think of here is when the user will want to test their application with the resource adapter for their EIS.  In this case, I think they would want to use Arquillian in AS7 with their specific resource adapter.

     

    Does that sound right to you?

  • 3. Re: Naming context to be used by SwitchYardTestKit
    Tomohisa igarashi Expert

    No problem, but thanks for the comment, Keith!

     

    Scenario 1 : our internal testing of the JCA gateway component.  Seems to me this should use embedded IronJacamar and several types of resource adapters.  JMS certainly and maybe a test one that's used in IronJacamar or one we develop on our own.  The purpose of these tests is to validate our implementation of a JCA gateway.

    As chatted on IRC, we may also use Arquillian for this Scenario.

     

    Scenario 2 : users developing applications which use the JCA gateway.  This is where a JCAMixIn comes into play.  The main scenario I can think of here is when the user will want to test their application with the resource adapter for their EIS.  In this case, I think they would want to use Arquillian in AS7 with their specific resource adapter.

    I think Scenario 2 can be divided in two phase - unit test and integration test. On unit test, user may want to test their SwitchYard application without connecting to the EIS, so it would be great if we provide the mock up stuff. And integration test is just you have mentioned as Scenario 2.

     

    However providing mock up stuff may be too ambitious at this moment. Let's see the Arquillian testcases first.

     

    Thanks,

    Tomo