JBoss JCA 1.0.0.Alpha7 is out

Posted by    |      

I'm happy to announce the 7th developer snapshot of the JBoss JCA project.

The full release notes are here.

ShrinkWrap support

This release adds support for deploying ShrinkWrap archives through the embedded configuration. This will allow you to quickly build resource adapters for your test cases without having physical representation on disk.

ShrinkWrap is very easy to use

import org.jboss.shrinkwrap.api.Archives;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;


   /**
    * Basic ShrinkWrap ResourceAdapterArchive test case
    * @exception Throwable Thrown if case of an error
    */
   @Test
   public void testBasic() throws Throwable
   {
      ResourceAdapterArchive raa =
         Archives.create(UUID.randomUUID().toString() + ".rar", ResourceAdapterArchive.class);

      JavaArchive ja = Archives.create(UUID.randomUUID().toString() + ".jar", JavaArchive.class);
      ja.addClasses(MessageListener.class, TestActivationSpec.class, TestConnection.class,
                    TestConnectionFactory.class, TestConnectionManager.class,
                    TestConnectionInterface.class, TestManagedConnection.class,
                    TestManagedConnectionFactory.class, TestResourceAdapter.class);

      raa.addLibrary(ja);
      raa.addManifestResource("simple.rar/META-INF/ra.xml", "ra.xml");

      try
      {
         embedded.deploy(raa);
      }
      catch (Throwable t)
      {
         log.error(t.getMessage(), t);
         fail(t.getMessage());
      }
      finally
      {
         embedded.undeploy(raa);
      }
   }

You can see a complete example of using ShrinkWrap in our org.jboss.jca.test.embedded.unit.ShrinkWrapTestCase test case.

Deployment verifier

This release also adds a deployment verifier that verifies specification requirements for the resource adapter classes.

The verifier will output which requirements which havn't been implemented, like

Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public int hashCode()" method.
Code: com.mycompany.myproject.ResourceAdapterImpl

Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public boolean equals(Object)" method.
Code: com.mycompany.myproject.ResourceAdapterImpl

This will give resource adapter developers a possibility to verify their implementation against the specification to a higher degree. The verifier can of course be configured to serve your needs.

We will continue to add new rules in future releases as well as provide an XML representation of the reports for tool processing. Feel free to drop by our forum to help out with these tasks.

The Road Ahead

Since EE6 have been released this month, we will focus on getting closer to a full implementation.

For Those About to Rock, We Salute You !

[WebSite] [Download] [JIRA] [Forum]


Back to top