[jboss-cvs] JBossAS SVN: r97468 - in projects/jboss-jca/trunk: embedded/src/main/java/org/jboss/jca/embedded and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Dec 4 11:22:13 EST 2009
Author: jesper.pedersen
Date: 2009-12-04 11:22:13 -0500 (Fri, 04 Dec 2009)
New Revision: 97468
Modified:
projects/jboss-jca/trunk/doc/userguide/en/modules/embedded.xml
projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/EmbeddedJCA.java
Log:
Mandate .rar extension for ResourceAdapterArchive
Modified: projects/jboss-jca/trunk/doc/userguide/en/modules/embedded.xml
===================================================================
--- projects/jboss-jca/trunk/doc/userguide/en/modules/embedded.xml 2009-12-04 15:57:31 UTC (rev 97467)
+++ projects/jboss-jca/trunk/doc/userguide/en/modules/embedded.xml 2009-12-04 16:22:13 UTC (rev 97468)
@@ -112,6 +112,11 @@
}
</programlisting>
+ <callout>
+ <note>Note that, the url for the archive must end with the <code>.rar</code> extension
+ - either representing a file or a directory.</note>
+ </callout>
+
<para>See the JBoss JCA Embedded API documentation for additional functionality.</para>
</section>
@@ -222,6 +227,11 @@
]]>
</programlisting>
+ <callout>
+ <note>Note that, the name for the <code>ResourceAdapterArchive</code> must end with the
+ <code>.rar</code> extension.</note>
+ </callout>
+
<para>See the <ulink url="http://www.jboss.org/community/wiki/ShrinkWrap">
ShrinkWrap</ulink> web site for a full description of the project and additional documentation.</para>
Modified: projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/EmbeddedJCA.java
===================================================================
--- projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/EmbeddedJCA.java 2009-12-04 15:57:31 UTC (rev 97467)
+++ projects/jboss-jca/trunk/embedded/src/main/java/org/jboss/jca/embedded/EmbeddedJCA.java 2009-12-04 16:22:13 UTC (rev 97468)
@@ -159,6 +159,9 @@
if (raa == null)
throw new IllegalArgumentException("Url is null");
+ if (!raa.getName().endsWith(".rar"))
+ throw new IllegalArgumentException(raa.getName() + " doesn't end with .rar");
+
InputStream is = raa.as(ZipExporter.class).exportZip();
File parentDirectory = new File(SecurityActions.getSystemProperty("java.io.tmpdir"));
More information about the jboss-cvs-commits
mailing list