[jboss-cvs] JBossAS SVN: r71525 - in branches/InjectionPrototype/server/src/main/org/jboss: ejb and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Mar 31 17:37:54 EDT 2008
Author: scott.stark at jboss.org
Date: 2008-03-31 17:37:53 -0400 (Mon, 31 Mar 2008)
New Revision: 71525
Added:
branches/InjectionPrototype/server/src/main/org/jboss/deployment/dependency/ContainerDependencyItem.java
branches/InjectionPrototype/server/src/main/org/jboss/deployment/dependency/ContainerDependencyMetaData.java
branches/InjectionPrototype/server/src/main/org/jboss/ejb/EjbContainer.java
Log:
Add the new files to the checkpoint
Added: branches/InjectionPrototype/server/src/main/org/jboss/deployment/dependency/ContainerDependencyItem.java
===================================================================
--- branches/InjectionPrototype/server/src/main/org/jboss/deployment/dependency/ContainerDependencyItem.java (rev 0)
+++ branches/InjectionPrototype/server/src/main/org/jboss/deployment/dependency/ContainerDependencyItem.java 2008-03-31 21:37:53 UTC (rev 71525)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.deployment.dependency;
+
+import org.jboss.dependency.plugins.AbstractDependencyItem;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.DependencyItem;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class ContainerDependencyItem extends AbstractDependencyItem
+ implements DependencyItem
+{
+ public ContainerDependencyItem(Object containerName,
+ String componentID, ControllerState whenRequired)
+ {
+ super(componentID, containerName, whenRequired, null);
+ }
+
+ @Override
+ public boolean resolve(Controller controller)
+ {
+ boolean resolved = super.resolve(controller);
+ setResolved(resolved);
+ return isResolved();
+ }
+
+ @Override
+ public void toString(JBossStringBuilder buffer)
+ {
+ super.toString(buffer);
+ buffer.append(" depend=").append(getName());
+ }
+
+ @Override
+ public void toShortString(JBossStringBuilder buffer)
+ {
+ buffer.append(getName()).append(" depend ").append(getName());
+ }
+
+ @Override
+ public String toHumanReadableString()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("JndiDepends: '");
+ builder.append(getName());
+ builder.append("'");
+ return builder.toString();
+ }
+
+}
Added: branches/InjectionPrototype/server/src/main/org/jboss/deployment/dependency/ContainerDependencyMetaData.java
===================================================================
--- branches/InjectionPrototype/server/src/main/org/jboss/deployment/dependency/ContainerDependencyMetaData.java (rev 0)
+++ branches/InjectionPrototype/server/src/main/org/jboss/deployment/dependency/ContainerDependencyMetaData.java 2008-03-31 21:37:53 UTC (rev 71525)
@@ -0,0 +1,199 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.deployment.dependency;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.jboss.beans.metadata.spi.DependencyMetaData;
+import org.jboss.beans.metadata.spi.MetaDataVisitor;
+import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.DependencyItem;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.javaee.spec.ResourceInjectionTargetMetaData;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class ContainerDependencyMetaData extends JBossObject
+ implements DependencyMetaData
+{
+ private static final long serialVersionUID = 1L;
+
+ private static final Logger log = Logger
+ .getLogger(ContainerDependencyMetaData.class);
+
+ /** The unique name of the deployment root */
+ private String deploymentRootName;
+ /** The id of the component in the deployment */
+ private String componentID;
+
+ private String encName;
+
+ /** The demand container bean name */
+ private Object containerName;
+
+ /** The container value */
+ private Object container;
+
+ /** The injection targets this bean container has */
+ private Set<ResourceInjectionTargetMetaData> targets = new HashSet<ResourceInjectionTargetMetaData>();
+ /** The jndi lookups this bean container has */
+ private Set<JndiDependencyMetaData> jndiDepends = new HashSet<JndiDependencyMetaData>();
+
+ private ControllerState whenRequired = ControllerState.INSTALLED;
+
+ /**
+ * Create a demand for a container name
+ *
+ * @param componentID -
+ * the id of the component in the deployment
+ */
+ public ContainerDependencyMetaData(String componentID)
+ {
+ this(componentID, ControllerState.INSTALLED);
+ }
+
+ public ContainerDependencyMetaData(String componentID,
+ ControllerState whenRequired)
+ {
+ this.componentID = componentID;
+ this.whenRequired = whenRequired;
+ }
+
+ public String getComponentID()
+ {
+ return componentID;
+ }
+ public String getDeploymentRootName()
+ {
+ return deploymentRootName;
+ }
+
+ public void setDeploymentRootName(String deploymentRootName)
+ {
+ this.deploymentRootName = deploymentRootName;
+ }
+
+ public String getContainerName()
+ {
+ return deploymentRootName + componentID;
+ }
+
+ public Object getDependency()
+ {
+ return container;
+ }
+
+ public ControllerState getWhenRequired()
+ {
+ return whenRequired;
+ }
+
+ public void describeVisit(MetaDataVisitor vistor)
+ {
+ vistor.describeVisit(this);
+ }
+
+ public Iterator<? extends MetaDataVisitorNode> getChildren()
+ {
+ return null;
+ }
+
+ public void initialVisit(MetaDataVisitor visitor)
+ {
+ DependencyItem item = new ContainerDependencyItem(containerName,
+ componentID, whenRequired);
+ visitor.addDependency(item);
+ visitor.initialVisit(this);
+ }
+
+ public String toShortString()
+ {
+ JBossStringBuilder buffer = new JBossStringBuilder();
+ toShortString(buffer);
+ return buffer.toString();
+ }
+
+ public void toShortString(JBossStringBuilder buffer)
+ {
+ buffer.append(containerName);
+ }
+
+ public void addInjectionTargets(Set<ResourceInjectionTargetMetaData> injectionTargets)
+ {
+ log.info("addInjectionTargets, " + injectionTargets);
+ this.targets.addAll(injectionTargets);
+ }
+
+ public Set<ResourceInjectionTargetMetaData> getInjectionTargets()
+ {
+ return this.targets;
+ }
+
+ public void addJndiDependency(JndiDependencyMetaData jdmd)
+ {
+ log.info("addJndiDependency, " + jdmd);
+ jndiDepends.add(jdmd);
+ }
+
+ public Set<JndiDependencyMetaData> getJndiDepends()
+ {
+ return this.jndiDepends;
+ }
+
+ @Override
+ protected int getHashCode()
+ {
+ // TODO Auto-generated method stub
+ return super.getHashCode();
+ }
+
+ @Override
+ protected String toStringImplementation()
+ {
+ StringBuilder tmp = new StringBuilder("ContainerDependencyMetaData(");
+ tmp.append("id=");
+ tmp.append(this.componentID);
+ tmp.append(",containerName=");
+ tmp.append(this.containerName);
+ tmp.append(",targets=");
+ tmp.append(this.targets);
+ tmp.append(",jndiDepends=");
+ tmp.append(this.jndiDepends);
+ tmp.append(")");
+ return tmp.toString();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ // TODO Auto-generated method stub
+ return super.equals(obj);
+ }
+
+}
Added: branches/InjectionPrototype/server/src/main/org/jboss/ejb/EjbContainer.java
===================================================================
--- branches/InjectionPrototype/server/src/main/org/jboss/ejb/EjbContainer.java (rev 0)
+++ branches/InjectionPrototype/server/src/main/org/jboss/ejb/EjbContainer.java 2008-03-31 21:37:53 UTC (rev 71525)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.ejb;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class EjbContainer
+{
+
+}
More information about the jboss-cvs-commits
mailing list