[jboss-cvs] JBossAS SVN: r85704 - in projects/ejb3/trunk: async-impl/src/main/java/org/jboss/ejb3/async/impl and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 10 20:36:56 EDT 2009
Author: ALRubinger
Date: 2009-03-10 20:36:56 -0400 (Tue, 10 Mar 2009)
New Revision: 85704
Added:
projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/
projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/RemotableFutureInterceptor.java
projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/RemoteAsyncTaskHashMap.java
projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/r2/
projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/r2/RemotableAsyncFutureInvocationHandler.java
projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/remote/
projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/remote/RemotableThreadPoolAsyncContainer.java
projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/remote/unit/
projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/
projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/EndpointConstants.java
projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/RemotableAsyncInvocationProcessor.java
projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/RemoteAsyncTaskRegistry.java
Modified:
projects/ejb3/trunk/async-impl/pom.xml
projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/ThreadPoolAsyncContainer.java
projects/ejb3/trunk/build/pom.xml
Log:
[EJBTHREE-1721] Remotable Future handling for @Asynchronous (need tests)
Modified: projects/ejb3/trunk/async-impl/pom.xml
===================================================================
--- projects/ejb3/trunk/async-impl/pom.xml 2009-03-11 00:31:37 UTC (rev 85703)
+++ projects/ejb3/trunk/async-impl/pom.xml 2009-03-11 00:36:56 UTC (rev 85704)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-build</artifactId>
- <version>1.0.0</version>
+ <version>1.0.3-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
@@ -132,6 +132,18 @@
<artifactId>jboss-aop</artifactId>
</dependency>
+ <!-- org.jboss.aspects:jboss-remoting-aspects -->
+ <dependency>
+ <groupId>org.jboss.aspects</groupId>
+ <artifactId>jboss-remoting-aspects</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-transaction-spi</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
<!-- org.jboss.aspects:jboss-aspects-common -->
<dependency>
<groupId>org.jboss.aspects</groupId>
Added: projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/RemotableFutureInterceptor.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/RemotableFutureInterceptor.java (rev 0)
+++ projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/RemotableFutureInterceptor.java 2009-03-11 00:36:56 UTC (rev 85704)
@@ -0,0 +1,155 @@
+/*
+ * 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.ejb3.async.impl.remote;
+
+import java.lang.reflect.Proxy;
+import java.util.UUID;
+import java.util.concurrent.Future;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
+import org.jboss.ejb3.async.impl.remote.r2.RemotableAsyncFutureInvocationHandler;
+import org.jboss.ejb3.async.spi.container.remote.RemotableAsyncInvocationProcessor;
+import org.jboss.ejb3.interceptors.container.ManagedObjectAdvisor;
+import org.jboss.logging.Logger;
+
+/**
+ * RemotableFutureInterceptor
+ *
+ * Examines invocation metadata to determine if this
+ * is a remote async invocation; if so, stores the returned Future
+ * into the RemoteAsyncTaskRegistry and returns a remotable
+ * hook to the client
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class RemotableFutureInterceptor implements Interceptor
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(RemotableFutureInterceptor.class);
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * No-arg constructor required
+ */
+ public RemotableFutureInterceptor()
+ {
+ log.debug("Created: " + this);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /* (non-Javadoc)
+ * @see org.jboss.aop.advice.Interceptor#getName()
+ */
+ public String getName()
+ {
+ return this.getClass().getSimpleName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.aop.advice.Interceptor#invoke(org.jboss.aop.joinpoint.Invocation)
+ */
+ public Object invoke(final Invocation invocation) throws Throwable
+ {
+ // Continue along the chain
+ final Object returnValue = invocation.invokeNext();
+
+ // If a remote invocation
+ if (this.isRemoteInvocation(invocation))
+ {
+ // If the return value is a Future
+ if (returnValue instanceof Future)
+ {
+ // Cast
+ final Future<?> futureReturnValue = (Future<?>) returnValue;
+
+ // Make a UUID so we can reference the return value later
+ final UUID uuid = UUID.randomUUID();
+
+ // Put into the Containers Remote Async Task Registry
+ this.getInvocationProcessor(invocation).getRemoteAsyncTaskRegistry().put(uuid, futureReturnValue);
+
+ // Return a remoteable hook to the actual Future
+ final Class<?>[] interfaces = new Class<?>[]
+ {Future.class};
+ final RemotableAsyncFutureInvocationHandler handler = new RemotableAsyncFutureInvocationHandler();
+ final Future<?> remotableFuture = (Future<?>) Proxy.newProxyInstance(Thread.currentThread()
+ .getContextClassLoader(), interfaces, handler);
+ return remotableFuture;
+ }
+ }
+
+ // NO-OP
+ return returnValue;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Internal Helper Methods --------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Determines whether the specified invocation is asynchronous
+ * by inspecting its metadata
+ */
+ //FIXME This implementation is specific to R2
+ private boolean isRemoteInvocation(final Invocation invocation)
+ {
+ // Precondition check
+ assert invocation instanceof MethodInvocation : this.getClass().getName() + " supports only "
+ + MethodInvocation.class.getSimpleName() + ", but has been passed: " + invocation;
+
+ // Get out remoting metadata (if it exists)
+ Object remotingMetadata = invocation.getMetaData(InvokeRemoteInterceptor.REMOTING,
+ InvokeRemoteInterceptor.INVOKER_LOCATOR);
+
+ // Return if the invocation was remote
+ return remotingMetadata != null;
+ }
+
+ /**
+ * Returns the Container associated w/ this Invocation
+ *
+ * @return
+ */
+ //FIXME We can't inject the Container?
+ @SuppressWarnings("unchecked")
+ private RemotableAsyncInvocationProcessor getInvocationProcessor(final Invocation invocation)
+ {
+ //TODO This won't work when we integrate w/ ejb3-core, as Advisor will need:
+ // ((ManagedObjectAdvisor) invocation.getAdvisor()).getContainer().getEJBContainer();
+ return (RemotableAsyncInvocationProcessor) ((ManagedObjectAdvisor) invocation.getAdvisor()).getContainer();
+ }
+
+}
Added: projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/RemoteAsyncTaskHashMap.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/RemoteAsyncTaskHashMap.java (rev 0)
+++ projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/RemoteAsyncTaskHashMap.java 2009-03-11 00:36:56 UTC (rev 85704)
@@ -0,0 +1,43 @@
+/*
+ * 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.ejb3.async.impl.remote;
+
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Future;
+
+import org.jboss.ejb3.async.spi.container.remote.RemoteAsyncTaskRegistry;
+
+/**
+ * RemoteAsyncTaskHashMap
+ *
+ * Hash-map-based implementation of a remote async task registry; Thread-safe
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class RemoteAsyncTaskHashMap extends ConcurrentHashMap<UUID, Future<?>> implements RemoteAsyncTaskRegistry
+{
+
+ private static final long serialVersionUID = 1L;
+
+}
Added: projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/r2/RemotableAsyncFutureInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/r2/RemotableAsyncFutureInvocationHandler.java (rev 0)
+++ projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/remote/r2/RemotableAsyncFutureInvocationHandler.java 2009-03-11 00:36:56 UTC (rev 85704)
@@ -0,0 +1,126 @@
+/*
+ * 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.ejb3.async.impl.remote.r2;
+
+import java.net.MalformedURLException;
+
+import org.jboss.aspects.remoting.PojiProxy;
+import org.jboss.ejb3.async.spi.container.remote.EndpointConstants;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.common.registrar.spi.NotBoundException;
+import org.jboss.logging.Logger;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.transport.Connector;
+
+/**
+ * RemotableAsyncFutureInvocationHandler
+ *
+ * Remotable proxy handler for a Future result of
+ * an Asynchronous invocation
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class RemotableAsyncFutureInvocationHandler extends PojiProxy
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Logger log = Logger.getLogger(RemotableAsyncFutureInvocationHandler.class);
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param uri The InvokerLocator to the target endpoint
+ */
+ public RemotableAsyncFutureInvocationHandler()
+ {
+ super(EndpointConstants.ASYNCHRONOUS_REMOTING_ENDPOINT_NAME,
+ getClientBinding(EndpointConstants.ASYNCHRONOUS_REMOTING_CONNECTOR_MC_BIND_NAME), null);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Internal Helper Methods --------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the InvokerLocator for the specified
+ * invokerName (supplied as the Object Store bind name in
+ * MC)
+ *
+ * @param invokerName
+ * @return
+ * @throws NotBoundException If the specified invokerName is not bound in MC
+ */
+ private static InvokerLocator getClientBinding(String invokerName) throws NotBoundException
+ {
+ // Initialize
+ String url = null;
+ Connector connector = null;
+ InvokerLocator locator = null;
+
+ // Lookup the Connector in MC
+ try
+ {
+ connector = Ejb3RegistrarLocator.locateRegistrar().lookup(invokerName, Connector.class);
+ }
+ catch (NotBoundException nbe)
+ {
+ // Log and rethrow
+ log.warn("Could not find the remoting connector for the specified invoker name, " + invokerName + " in MC");
+ throw nbe;
+ }
+
+ // Use the binding specified by the Connector
+ try
+ {
+ url = connector.getInvokerLocator();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Could not obtain " + InvokerLocator.class.getSimpleName()
+ + " from EJB3 Remoting Connector", e);
+ }
+
+ // Construct Locator
+ try
+ {
+ locator = new InvokerLocator(url);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+
+ // Return
+ return locator;
+ }
+
+}
Modified: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/ThreadPoolAsyncContainer.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/ThreadPoolAsyncContainer.java 2009-03-11 00:31:37 UTC (rev 85703)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/ThreadPoolAsyncContainer.java 2009-03-11 00:36:56 UTC (rev 85704)
@@ -72,7 +72,7 @@
// Accessors / Mutators -----------------------------------------------------------||
// --------------------------------------------------------------------------------||
- public void setAsynchronousExecutor(final ExecutorService asynchronousExecutor)
+ private void setAsynchronousExecutor(final ExecutorService asynchronousExecutor)
{
this.asynchronousExecutor = asynchronousExecutor;
}
Added: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/remote/RemotableThreadPoolAsyncContainer.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/remote/RemotableThreadPoolAsyncContainer.java (rev 0)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/remote/RemotableThreadPoolAsyncContainer.java 2009-03-11 00:36:56 UTC (rev 85704)
@@ -0,0 +1,90 @@
+/*
+ * 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.ejb3.async.impl.test.remote;
+
+import java.util.concurrent.ExecutorService;
+
+import org.jboss.aop.Dispatcher;
+import org.jboss.ejb3.async.impl.test.common.AsyncTestUtil;
+import org.jboss.ejb3.async.impl.test.common.ThreadPoolAsyncContainer;
+import org.jboss.ejb3.async.spi.container.remote.EndpointConstants;
+import org.jboss.ejb3.async.spi.container.remote.RemotableAsyncInvocationProcessor;
+import org.jboss.ejb3.async.spi.container.remote.RemoteAsyncTaskRegistry;
+
+/**
+ * ThreadPoolAsyncContainer
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class RemotableThreadPoolAsyncContainer<T> extends ThreadPoolAsyncContainer<T>
+ implements
+ RemotableAsyncInvocationProcessor
+{
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private RemoteAsyncTaskRegistry remoteAsyncTaskRegistry;
+
+ // --------------------------------------------------------------------------------||
+ // Constructors -------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public RemotableThreadPoolAsyncContainer(final String name, final String domainName,
+ final Class<? extends T> beanClass, final RemoteAsyncTaskRegistry remoteAsyncTaskRegistry)
+ {
+ this(name, domainName, beanClass, remoteAsyncTaskRegistry, AsyncTestUtil.getDefaultAsyncExecutorService());
+ }
+
+ public RemotableThreadPoolAsyncContainer(final String name, final String domainName,
+ final Class<? extends T> beanClass, final RemoteAsyncTaskRegistry remoteAsyncTaskRegistry,
+ final ExecutorService asynchronousExecutor)
+ {
+ super(name, domainName, beanClass, asynchronousExecutor);
+ this.setRemoteAsyncTaskRegistry(remoteAsyncTaskRegistry);
+
+ // Register w/ Remoting (R2)
+ // In an actual implementation we won't expose "this", but rather a
+ // simplified view which delegates to the Container
+ Dispatcher.singleton.registerTarget(EndpointConstants.ASYNCHRONOUS_REMOTING_ENDPOINT_NAME, this);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public RemoteAsyncTaskRegistry getRemoteAsyncTaskRegistry()
+ {
+ return remoteAsyncTaskRegistry;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private void setRemoteAsyncTaskRegistry(RemoteAsyncTaskRegistry remoteAsyncTaskRegistry)
+ {
+ this.remoteAsyncTaskRegistry = remoteAsyncTaskRegistry;
+ }
+
+}
Added: projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/EndpointConstants.java
===================================================================
--- projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/EndpointConstants.java (rev 0)
+++ projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/EndpointConstants.java 2009-03-11 00:36:56 UTC (rev 85704)
@@ -0,0 +1,49 @@
+/*
+ * 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.ejb3.async.spi.container.remote;
+
+/**
+ * EndpointConstants
+ *
+ * Defines contracted constants for Asynchronous Remoting Endpoints
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface EndpointConstants
+{
+
+ // --------------------------------------------------------------------------------||
+ // Contracts ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Name under which the server-side remoting endpoint for asynchronous
+ * invocations is registered
+ */
+ String ASYNCHRONOUS_REMOTING_ENDPOINT_NAME = "org.jboss.ejb3.async.remoting.AsynchronousRemotingEndpoint";
+
+ /**
+ * The name under which the Remoting Connector is bound in MC
+ */
+ String ASYNCHRONOUS_REMOTING_CONNECTOR_MC_BIND_NAME = "org.jboss.ejb3.async.remoting.ConnectorMcBindName";
+}
Added: projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/RemotableAsyncInvocationProcessor.java
===================================================================
--- projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/RemotableAsyncInvocationProcessor.java (rev 0)
+++ projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/RemotableAsyncInvocationProcessor.java 2009-03-11 00:36:56 UTC (rev 85704)
@@ -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.ejb3.async.spi.container.remote;
+
+import org.jboss.ejb3.async.spi.container.AsyncInvocationProcessor;
+
+/**
+ * RemotableAsyncInvocationProcessor
+ *
+ * ejb3-async view of a remoteable target Container
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface RemotableAsyncInvocationProcessor extends AsyncInvocationProcessor
+{
+
+ // --------------------------------------------------------------------------------||
+ // Contracts ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the registry holding remote async tasks
+ */
+ RemoteAsyncTaskRegistry getRemoteAsyncTaskRegistry();
+
+}
Added: projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/RemoteAsyncTaskRegistry.java
===================================================================
--- projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/RemoteAsyncTaskRegistry.java (rev 0)
+++ projects/ejb3/trunk/async-spi/src/main/java/org/jboss/ejb3/async/spi/container/remote/RemoteAsyncTaskRegistry.java 2009-03-11 00:36:56 UTC (rev 85704)
@@ -0,0 +1,37 @@
+/*
+ * 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.ejb3.async.spi.container.remote;
+
+import java.util.UUID;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.Future;
+
+/**
+ * RemoteAsyncTaskRegistry
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface RemoteAsyncTaskRegistry extends ConcurrentMap<UUID, Future<?>>
+{
+
+}
Modified: projects/ejb3/trunk/build/pom.xml
===================================================================
--- projects/ejb3/trunk/build/pom.xml 2009-03-11 00:31:37 UTC (rev 85703)
+++ projects/ejb3/trunk/build/pom.xml 2009-03-11 00:36:56 UTC (rev 85704)
@@ -373,7 +373,7 @@
<dependency>
<groupId>org.jboss.aspects</groupId>
<artifactId>jboss-remoting-aspects</artifactId>
- <version>1.0.1.CR4</version>
+ <version>1.0.1.GA</version>
</dependency>
<!-- JavaEE APIs -->
More information about the jboss-cvs-commits
mailing list