I'm happy to announce the 13th developer snapshot release of JBoss JCA 1.0.
Full release notes are here.
Security integration
The initial security integration with the container is now done.
We have added the possibility to specify users and roles in property files under the config
directory.
This means that you can now execute your javax.resource.spi.work.Work instances under a security context and make use of the JSR-196 callbacks as specified in the JCA 1.6 specification.
We will be looking at adding additional security integration plugins in future releases.
Arquillian support
Look Ma' Space Aliens !
We have added integration with the Arquillian project in our embedded JCA container setup. This allows an even easier unit test setup than before.
An example would be
package org.jboss.jca.embedded.unit;
import org.jboss.jca.embedded.rars.simple.MessageListener;
import org.jboss.jca.embedded.rars.simple.TestActivationSpec;
import org.jboss.jca.embedded.rars.simple.TestConnection;
import org.jboss.jca.embedded.rars.simple.TestConnectionFactory;
import org.jboss.jca.embedded.rars.simple.TestConnectionInterface;
import org.jboss.jca.embedded.rars.simple.TestConnectionManager;
import org.jboss.jca.embedded.rars.simple.TestManagedConnection;
import org.jboss.jca.embedded.rars.simple.TestManagedConnectionFactory;
import org.jboss.jca.embedded.rars.simple.TestResourceAdapter;
import java.util.UUID;
import javax.annotation.Resource;
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.logging.Logger;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Unit test for Arquillian integration
*
* @author <a href="mailto:jesper.pedersen@jboss.org">Jesper Pedersen</a>
*/
@RunWith(Arquillian.class)
public class ArquillianTestCase
{
// --------------------------------------------------------------------------------||
// Class Members ------------------------------------------------------------------||
// --------------------------------------------------------------------------------||
private static Logger log = Logger.getLogger(ArquillianTestCase.class);
private static String deploymentName = "ArquillianRA";
/** The resource adapter */
@Resource
private TestConnectionFactory cf;
/**
* Define the deployment
* @return The deployment archive
*/
@Deployment
public static ResourceAdapterArchive createDeployment()
{
ResourceAdapterArchive raa =
ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName + ".rar");
JavaArchive ja = ShrinkWrap.create(JavaArchive.class,
UUID.randomUUID().toString() + ".jar");
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");
return raa;
}
//-------------------------------------------------------------------------------------||
// Tests ------------------------------------------------------------------------------||
//-------------------------------------------------------------------------------------||
/**
* Basic
* @exception Throwable Thrown if case of an error
*/
@Test
public void testBasic() throws Throwable
{
assertNotNull(cf);
}
}
So when your boss ask you why you havn't got a proper test suite for the resource adapter -- what are you going say ?!?
Code generator
Our code generator have seen a lot of updates this month adding full support for all JCA specifications, and it now even creates a test suite setup for the resource adapter.
The code generator now has the following features
- JCA 1.6 using annotations
- JCA 1.6 using metadata
- JCA 1.5
- JCA 1.0
- Test suite
- Apache Ant build environment
We will keep adding more features in our next releases, but be sure to send us your feedback on its usability.
Container changes
Our Jetty integration have been moved to the system
directory in the container layout to allow an easy way to uninstall this feature if you don't need it.
We have upgraded the version of Jetty to 7.1.4 to keep up with its development.
The Road Ahead
This release brings us a lot closer to our first Beta release of the project :) We still have a couple of TODOs that needs to be fixed, but we are pushing hard to get the release out.
See ya' @ JUDCon on Monday !
For Those About to Rock, We Salute You !