From 1fb6a28a73ca17dbb8c4b3059db590e2f9620943 Mon Sep 17 00:00:00 2001 From: antelder Date: Wed, 3 Aug 2011 09:21:41 +0000 Subject: Correct tag name git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1153404 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/host/ejb/DefaultEJBHostExtensionPoint.java | 45 -------------- .../org/apache/tuscany/sca/host/ejb/EJBHost.java | 62 ------------------- .../sca/host/ejb/EJBHostExtensionPoint.java | 51 ---------------- .../sca/host/ejb/EJBRegistrationException.java | 44 -------------- .../tuscany/sca/host/ejb/EJBSessionBean.java | 45 -------------- .../tuscany/sca/host/ejb/ExtensibleEJBHost.java | 69 ---------------------- 6 files changed, 316 deletions(-) delete mode 100644 sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/DefaultEJBHostExtensionPoint.java delete mode 100644 sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHost.java delete mode 100644 sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHostExtensionPoint.java delete mode 100644 sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBRegistrationException.java delete mode 100644 sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBSessionBean.java delete mode 100644 sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/ExtensibleEJBHost.java (limited to 'sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host') diff --git a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/DefaultEJBHostExtensionPoint.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/DefaultEJBHostExtensionPoint.java deleted file mode 100644 index c0107cb316..0000000000 --- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/DefaultEJBHostExtensionPoint.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.host.ejb; - -import java.util.ArrayList; -import java.util.List; - -/** - * Default implementation of an EJB host extension point. - * - * @version $Rev$ $Date$ - */ -public class DefaultEJBHostExtensionPoint implements EJBHostExtensionPoint { - - private List ejbHosts = new ArrayList(); - - public void addEJBHost(EJBHost ejbHost) { - ejbHosts.add(ejbHost); - } - - public void removeEJBHost(EJBHost ejbHost) { - ejbHosts.remove(ejbHost); - } - - public List getEJBHosts() { - return ejbHosts; - } -} diff --git a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHost.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHost.java deleted file mode 100644 index 842dd7a4f5..0000000000 --- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHost.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.host.ejb; - - - -/** - * Interface implemented by host environments that allow EJBs - * to be registered. - *

- * This interface allows a system service to register an EJB session - * bean to handle inbound requests. - * - * @version $Rev$ $Date$ - */ -public interface EJBHost { - - /** - * Add an EJB session bean. - * - * @param ejbName the EJB name - * @param sessionBean the EJB session bean descriptor - * @throws EJBRegistrationException - */ - void addSessionBean(String ejbName, EJBSessionBean sessionBean) throws EJBRegistrationException; - - /** - * Remove an EJB session bean. - * - * @param ejbName the EJB name - * @return the EJB session bean descriptor that was registered under that name - * @throws EJBRegistrationException - */ - EJBSessionBean removeSessionBean(String ejbName) throws EJBRegistrationException; - - /** - * Returns the EJB session bean descriptor registered under - * the given EJB name. - * - * @param ejbName the EJB name - * @return the EJB session bean descriptor - * @throws EJBRegistrationException - */ - EJBSessionBean getSessionBean(String ejbName) throws EJBRegistrationException; - -} diff --git a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHostExtensionPoint.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHostExtensionPoint.java deleted file mode 100644 index 75912dcc45..0000000000 --- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBHostExtensionPoint.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.host.ejb; - -import java.util.List; - -/** - * An extension point for EJB hosts. - * - * @version $Rev$ $Date$ - */ -public interface EJBHostExtensionPoint { - - /** - * Adds an EJB host extension. - * - * @param ejbHost - */ - void addEJBHost(EJBHost ejbHost); - - /** - * Removes an EJB host extension. - * - * @param ejbHost - */ - void removeEJBHost(EJBHost ejbHost); - - /** - * Returns a list of EJB host extensions. - * - * @return - */ - List getEJBHosts(); - -} diff --git a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBRegistrationException.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBRegistrationException.java deleted file mode 100644 index a50e701766..0000000000 --- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBRegistrationException.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.host.ejb; - -/** - * Indicates an exception while registering an EJB. - * - * @version $Rev$ $Date$ - */ -public class EJBRegistrationException extends RuntimeException { - private static final long serialVersionUID = 1L; - - public EJBRegistrationException() { - super(); - } - - public EJBRegistrationException(String message) { - super(message); - } - - public EJBRegistrationException(String message, Throwable cause) { - super(message, cause); - } - - public EJBRegistrationException(Throwable cause) { - super(cause); - } -} diff --git a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBSessionBean.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBSessionBean.java deleted file mode 100644 index f9967bdd8a..0000000000 --- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/EJBSessionBean.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.host.ejb; - -/** - * Represents an EJB session bean. - * - * @version $Rev: $ $Date: $ - */ -public class EJBSessionBean { - - private Class implementationClass; - private Class remoteInterface; - - public EJBSessionBean(Class implementationClass, Class remoteInterface) { - this.implementationClass = implementationClass; - this.remoteInterface = remoteInterface; - } - - public Class getImplementationClass() { - return implementationClass; - } - - public Class getRemoteInterface() { - return remoteInterface; - } - -} diff --git a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/ExtensibleEJBHost.java b/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/ExtensibleEJBHost.java deleted file mode 100644 index fab408c7c0..0000000000 --- a/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-ejb/src/main/java/org/apache/tuscany/sca/host/ejb/ExtensibleEJBHost.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.host.ejb; - - -/** - * Default implementation of an extensible EJB host. - * - * @version $Rev$ $Date$ - */ -public class ExtensibleEJBHost implements EJBHost { - - private EJBHostExtensionPoint ejbHosts; - - public ExtensibleEJBHost(EJBHostExtensionPoint ejbHosts) { - this.ejbHosts = ejbHosts; - } - - public void addSessionBean(String ejbName, EJBSessionBean ejbClass) throws EJBRegistrationException { - if (ejbHosts.getEJBHosts().isEmpty()) { - throw new EJBRegistrationException("No EJB host available"); - } - - // TODO implement selection of the correct EJB host based on the mapping - // For now just select the first one - getDefaultEJBHost().addSessionBean(ejbName, ejbClass); - } - - public EJBSessionBean removeSessionBean(String ejbName) throws EJBRegistrationException { - if (ejbHosts.getEJBHosts().isEmpty()) { - throw new EJBRegistrationException("No EJB host available"); - } - - // TODO implement selection of the correct EJB host based on the mapping - // For now just select the first one - return getDefaultEJBHost().removeSessionBean(ejbName); - } - - public EJBSessionBean getSessionBean(String ejbName) throws EJBRegistrationException { - if (ejbHosts.getEJBHosts().isEmpty()) { - throw new EJBRegistrationException("No EJB host available"); - } - - // TODO implement selection of the correct EJB host based on the mapping - // For now just select the first one - return getDefaultEJBHost().getSessionBean(ejbName); - } - - private EJBHost getDefaultEJBHost() { - return ejbHosts.getEJBHosts().get(0); - } -} -- cgit v1.2.3