[jboss-cvs] JBossAS SVN: r97144 - in projects/jboss-jca/trunk: fungal/src/main/java/org/jboss/jca/fungal/api and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Nov 29 09:20:00 EST 2009
Author: jesper.pedersen
Date: 2009-11-29 09:20:00 -0500 (Sun, 29 Nov 2009)
New Revision: 97144
Added:
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/api/MainDeployer.java
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerImpl.java
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerImplMBean.java
Removed:
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployer.java
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerMBean.java
Modified:
projects/jboss-jca/trunk/doc/developerguide/en/modules/fungal.xml
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/api/Kernel.java
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/DeploymentDeployer.java
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/KernelImpl.java
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/remote/Communication.java
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/FileUtil.java
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/Injection.java
Log:
Expose MainDeployer in api.Kernel
Modified: projects/jboss-jca/trunk/doc/developerguide/en/modules/fungal.xml
===================================================================
--- projects/jboss-jca/trunk/doc/developerguide/en/modules/fungal.xml 2009-11-29 13:58:41 UTC (rev 97143)
+++ projects/jboss-jca/trunk/doc/developerguide/en/modules/fungal.xml 2009-11-29 14:20:00 UTC (rev 97144)
@@ -462,6 +462,7 @@
<programlisting>
import org.jboss.jca.fungal.api.Kernel;
+import org.jboss.jca.fungal.api.MainDeployer;
import org.jboss.jca.fungal.impl.KernelConfiguration;
import org.jboss.jca.fungal.impl.KernelImpl;
@@ -471,10 +472,19 @@
Kernel kernel = new KernelImpl(kernelConfiguration);
kernel.startup();
+
+// Get the reference to the main deployer
+MainDeployer mainDeployer = kernel.getMainDeployer();
+
+// Reference to my deployment
+URL myDeployment = ...;
+
+mainDeployer.deploy(myDeployment);
</programlisting>
<para>where the <code>KernelConfiguration</code> object allows you to
- configure the kernel setup.</para>
+ configure the kernel setup. The <code>MainDeployer</code> allows you
+ to deploy and undeploy deployment units that are supported.</para>
<para>The kernel is stopped using</para>
Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/api/Kernel.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/api/Kernel.java 2009-11-29 13:58:41 UTC (rev 97143)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/api/Kernel.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -37,6 +37,12 @@
public MBeanServer getMBeanServer();
/**
+ * Get the MainDeployer for the kernel
+ * @return The MainDeployer instance
+ */
+ public MainDeployer getMainDeployer();
+
+ /**
* Startup
* @exception Throwable Thrown if an error occurs
*/
Added: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/api/MainDeployer.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/api/MainDeployer.java (rev 0)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/api/MainDeployer.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.fungal.api;
+
+import java.net.URL;
+
+/**
+ * The main deployer for JBoss JCA/Fungal
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public interface MainDeployer
+{
+ /**
+ * Deploy uses the kernel class loader as the parent class loader
+ * @param url The URL for the deployment
+ * @exception Throwable If an error occurs
+ */
+ public void deploy(URL url) throws Throwable;
+
+ /**
+ * Undeploy
+ * @param url The URL for the deployment
+ * @exception Throwable If an error occurs
+ */
+ public void undeploy(URL url) throws Throwable;
+}
Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/DeploymentDeployer.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/DeploymentDeployer.java 2009-11-29 13:58:41 UTC (rev 97143)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/DeploymentDeployer.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -463,7 +463,7 @@
// Register deployer
if (instance instanceof Deployer)
{
- kernel.getMainDeployer().addDeployer((Deployer)instance);
+ ((MainDeployerImpl)kernel.getMainDeployer()).addDeployer((Deployer)instance);
}
return instance;
Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/KernelImpl.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/KernelImpl.java 2009-11-29 13:58:41 UTC (rev 97143)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/KernelImpl.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -23,6 +23,7 @@
package org.jboss.jca.fungal.impl;
import org.jboss.jca.fungal.api.Kernel;
+import org.jboss.jca.fungal.api.MainDeployer;
import org.jboss.jca.fungal.deployers.Deployment;
import org.jboss.jca.fungal.impl.remote.CommunicationServer;
@@ -89,7 +90,7 @@
private KernelClassLoader kernelClassLoader;
/** Main deployer */
- private MainDeployer mainDeployer;
+ private MainDeployerImpl mainDeployer;
/** MBeanServer */
private MBeanServer mbeanServer;
@@ -205,7 +206,7 @@
mbeanServer = MBeanServerFactory.createMBeanServer("jboss.jca");
// Main deployer
- mainDeployer = new MainDeployer(this);
+ mainDeployer = new MainDeployerImpl(this);
ObjectName mainDeployerObjectName = new ObjectName("jboss.jca:name=MainDeployer");
mbeanServer.registerMBean(mainDeployer, mainDeployerObjectName);
@@ -290,7 +291,7 @@
if (isDebugEnabled())
debug("URL=" + url.toString());
- MainDeployer deployer = (MainDeployer)mainDeployer.clone();
+ MainDeployerImpl deployer = (MainDeployerImpl)mainDeployer.clone();
UnitDeployer unitDeployer = new UnitDeployer(url, deployer, kernelClassLoader, unitLatch);
unitDeployers.add(unitDeployer);
@@ -846,7 +847,7 @@
private URL url;
/** Main deployer */
- private MainDeployer deployer;
+ private MainDeployerImpl deployer;
/** Class loader */
private ClassLoader classLoader;
@@ -861,7 +862,7 @@
* Constructor
*/
public UnitDeployer(final URL url,
- final MainDeployer deployer,
+ final MainDeployerImpl deployer,
final ClassLoader classLoader,
final CountDownLatch unitLatch)
{
Deleted: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployer.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployer.java 2009-11-29 13:58:41 UTC (rev 97143)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployer.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -1,158 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008-2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.jca.fungal.impl;
-
-import org.jboss.jca.fungal.deployers.CloneableDeployer;
-import org.jboss.jca.fungal.deployers.Deployer;
-import org.jboss.jca.fungal.deployers.Deployment;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-/**
- * The main deployer for JBoss JCA/Fungal
- * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
- */
-public class MainDeployer implements Cloneable, MainDeployerMBean
-{
- private static List<Deployer> deployers = new CopyOnWriteArrayList<Deployer>();
-
- private KernelImpl kernel;
- private List<Deployer> copy;
-
- /**
- * Constructor
- * @param kernel The kernel
- */
- public MainDeployer(KernelImpl kernel)
- {
- if (kernel == null)
- throw new IllegalArgumentException("Kernel is null");
-
- this.kernel = kernel;
- this.copy = null;
- }
-
- /**
- * Add deployer
- * @param deployer The deployer
- */
- public void addDeployer(Deployer deployer)
- {
- if (deployer == null)
- throw new IllegalArgumentException("Deployer is null");
-
- deployers.add(deployer);
- }
-
- /**
- * Deploy uses the kernel class loader as the parent class loader
- * @param url The URL for the deployment
- * @exception Throwable If an error occurs
- */
- public void deploy(URL url) throws Throwable
- {
- deploy(url, kernel.getKernelClassLoader());
- }
-
- /**
- * Deploy
- * @param url The URL for the deployment
- * @param classLoader The parent class loader for the deployment
- * @exception Throwable If an error occurs
- */
- public void deploy(URL url, ClassLoader classLoader) throws Throwable
- {
- if (url == null)
- throw new IllegalArgumentException("URL is null");
-
- if (classLoader == null)
- throw new IllegalArgumentException("ClassLoader is null");
-
- if (copy == null || copy.size() != deployers.size())
- {
- copy = new ArrayList<Deployer>(deployers.size());
- for (Deployer deployer : deployers)
- {
- if (deployer instanceof CloneableDeployer)
- {
- try
- {
- copy.add(((CloneableDeployer)deployer).clone());
- }
- catch (CloneNotSupportedException cnse)
- {
- // Add the deployer and assume synchronized access
- copy.add(deployer);
- }
- }
- else
- {
- // Assume synchronized access to deploy()
- copy.add(deployer);
- }
- }
- }
-
- boolean done = false;
-
- for (int i = 0; !done && i < copy.size(); i++)
- {
- Deployer deployer = copy.get(i);
-
- Deployment deployment = deployer.deploy(url, classLoader);
- if (deployment != null)
- {
- kernel.registerDeployment(deployment);
- done = true;
- }
- }
- }
-
- /**
- * Undeploy
- * @param url The URL for the deployment
- * @exception Throwable If an error occurs
- */
- public void undeploy(URL url) throws Throwable
- {
- if (url == null)
- throw new IllegalArgumentException("URL is null");
-
- Deployment deployment = kernel.findDeployment(url);
- if (deployment != null)
- kernel.shutdownDeployment(deployment);
- }
-
- /**
- * Clone
- * @return The copy of the object
- * @exception CloneNotSupportedException Thrown if a copy can't be created
- */
- public Object clone() throws CloneNotSupportedException
- {
- return new MainDeployer(kernel);
- }
-}
Copied: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerImpl.java (from rev 97128, projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployer.java)
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerImpl.java (rev 0)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerImpl.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.fungal.impl;
+
+import org.jboss.jca.fungal.deployers.CloneableDeployer;
+import org.jboss.jca.fungal.deployers.Deployer;
+import org.jboss.jca.fungal.deployers.Deployment;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+/**
+ * The main deployer for JBoss JCA/Fungal
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public class MainDeployerImpl implements Cloneable, MainDeployerImplMBean
+{
+ private static List<Deployer> deployers = new CopyOnWriteArrayList<Deployer>();
+
+ private KernelImpl kernel;
+ private List<Deployer> copy;
+
+ /**
+ * Constructor
+ * @param kernel The kernel
+ */
+ public MainDeployerImpl(KernelImpl kernel)
+ {
+ if (kernel == null)
+ throw new IllegalArgumentException("Kernel is null");
+
+ this.kernel = kernel;
+ this.copy = null;
+ }
+
+ /**
+ * Add deployer
+ * @param deployer The deployer
+ */
+ public void addDeployer(Deployer deployer)
+ {
+ if (deployer == null)
+ throw new IllegalArgumentException("Deployer is null");
+
+ deployers.add(deployer);
+ }
+
+ /**
+ * Deploy uses the kernel class loader as the parent class loader
+ * @param url The URL for the deployment
+ * @exception Throwable If an error occurs
+ */
+ public synchronized void deploy(URL url) throws Throwable
+ {
+ deploy(url, kernel.getKernelClassLoader());
+ }
+
+ /**
+ * Deploy
+ * @param url The URL for the deployment
+ * @param classLoader The parent class loader for the deployment
+ * @exception Throwable If an error occurs
+ */
+ public synchronized void deploy(URL url, ClassLoader classLoader) throws Throwable
+ {
+ if (url == null)
+ throw new IllegalArgumentException("URL is null");
+
+ if (classLoader == null)
+ throw new IllegalArgumentException("ClassLoader is null");
+
+ if (copy == null || copy.size() != deployers.size())
+ {
+ copy = new ArrayList<Deployer>(deployers.size());
+ for (Deployer deployer : deployers)
+ {
+ if (deployer instanceof CloneableDeployer)
+ {
+ try
+ {
+ copy.add(((CloneableDeployer)deployer).clone());
+ }
+ catch (CloneNotSupportedException cnse)
+ {
+ // Add the deployer and assume synchronized access
+ copy.add(deployer);
+ }
+ }
+ else
+ {
+ // Assume synchronized access to deploy()
+ copy.add(deployer);
+ }
+ }
+ }
+
+ boolean done = false;
+
+ for (int i = 0; !done && i < copy.size(); i++)
+ {
+ Deployer deployer = copy.get(i);
+
+ Deployment deployment = deployer.deploy(url, classLoader);
+ if (deployment != null)
+ {
+ kernel.registerDeployment(deployment);
+ done = true;
+ }
+ }
+ }
+
+ /**
+ * Undeploy
+ * @param url The URL for the deployment
+ * @exception Throwable If an error occurs
+ */
+ public synchronized void undeploy(URL url) throws Throwable
+ {
+ if (url == null)
+ throw new IllegalArgumentException("URL is null");
+
+ Deployment deployment = kernel.findDeployment(url);
+ if (deployment != null)
+ kernel.shutdownDeployment(deployment);
+ }
+
+ /**
+ * Clone
+ * @return The copy of the object
+ * @exception CloneNotSupportedException Thrown if a copy can't be created
+ */
+ public Object clone() throws CloneNotSupportedException
+ {
+ return new MainDeployerImpl(kernel);
+ }
+}
Added: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerImplMBean.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerImplMBean.java (rev 0)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerImplMBean.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca.fungal.impl;
+
+import org.jboss.jca.fungal.api.MainDeployer;
+
+/**
+ * The main deployer MBean for JBoss JCA/Fungal
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ */
+public interface MainDeployerImplMBean extends MainDeployer
+{
+}
Deleted: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerMBean.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerMBean.java 2009-11-29 13:58:41 UTC (rev 97143)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/MainDeployerMBean.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008-2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.jca.fungal.impl;
-
-import java.net.URL;
-
-/**
- * The main deployer MBean for JBoss JCA/Fungal
- * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
- */
-public interface MainDeployerMBean
-{
- /**
- * Deploy
- * @param url The URL for the deployment
- * @exception Throwable If an error occurs
- */
- public void deploy(URL url) throws Throwable;
-
- /**
- * Undeploy
- * @param url The URL for the deployment
- * @exception Throwable If an error occurs
- */
- public void undeploy(URL url) throws Throwable;
-}
Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/remote/Communication.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/remote/Communication.java 2009-11-29 13:58:41 UTC (rev 97143)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/remote/Communication.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -22,7 +22,7 @@
package org.jboss.jca.fungal.impl.remote;
-import org.jboss.jca.fungal.impl.MainDeployer;
+import org.jboss.jca.fungal.api.MainDeployer;
import java.io.IOException;
import java.io.ObjectInputStream;
Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/FileUtil.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/FileUtil.java 2009-11-29 13:58:41 UTC (rev 97143)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/FileUtil.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -61,7 +61,7 @@
* @param target The JAR file
* @exception IOException Thrown if an error occurs
*/
- public void compress(File directory, File target) throws IOException
+ public synchronized void compress(File directory, File target) throws IOException
{
if (directory == null)
throw new IllegalArgumentException("Directory is null");
@@ -171,7 +171,7 @@
* @return The root of the extracted JAR file
* @exception IOException Thrown if an error occurs
*/
- public File extract(File file, File directory) throws IOException
+ public synchronized File extract(File file, File directory) throws IOException
{
if (file == null)
throw new IllegalArgumentException("File is null");
@@ -254,7 +254,7 @@
* @param f The file handler
* @exception IOException Thrown if a file could not be deleted
*/
- public void recursiveDelete(File f) throws IOException
+ public synchronized void recursiveDelete(File f) throws IOException
{
if (f != null && f.exists())
{
Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/Injection.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/Injection.java 2009-11-29 13:58:41 UTC (rev 97143)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/util/Injection.java 2009-11-29 14:20:00 UTC (rev 97144)
@@ -49,7 +49,7 @@
* @exception IllegalAccessException If the property method cannot be accessed
* @exception InvocationTargetException If the property method cannot be executed
*/
- public void inject(String propertyType, String propertyName, String propertyValue, Object object)
+ public synchronized void inject(String propertyType, String propertyName, String propertyValue, Object object)
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
{
if (propertyType == null || propertyType.trim().equals(""))
More information about the jboss-cvs-commits
mailing list