[jboss-cvs] JBossAS SVN: r63759 - in branches/JBossWS_2_0_0_GA: build and 9 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Jul 1 17:08:34 EDT 2007
Author: thomas.diesler at jboss.com
Date: 2007-07-01 17:08:34 -0400 (Sun, 01 Jul 2007)
New Revision: 63759
Added:
branches/JBossWS_2_0_0_GA/mergeinfo.txt
Modified:
branches/JBossWS_2_0_0_GA/build/build-distr.xml
branches/JBossWS_2_0_0_GA/build/build-thirdparty.xml
branches/JBossWS_2_0_0_GA/build/build.xml
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3JBoss5Deployment.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/WebserviceDescription.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/Webservices.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
branches/JBossWS_2_0_0_GA/server/src/etc/conf/default/log4j.xml
branches/JBossWS_2_0_0_GA/server/src/main/org/jboss/deployment/JBossEjbObjectFactory.java
branches/JBossWS_2_0_0_GA/server/src/main/org/jboss/metadata/ApplicationMetaData.java
branches/JBossWS_2_0_0_GA/server/src/resources/dtd/jboss_5_0.dtd
branches/JBossWS_2_0_0_GA/system/src/bin/run.sh
Log:
Enable JBossWS message tracing
[EJBTHREE-933] NPE when deploying web service beans
Add support for <port-component> on generic ejb3
Add jboss-security-spi.jar to client
Remove support for multiple <port-component>
Cleanup <webservices> handling in jboss.xml
Expose EjbJarDD through deployment unit
Migrate webservice context root processing to jbossws
JBAS-4332, bin/run.sh should force IPv4 on Linux systems
Fix <webservice-description> handling
Update to jbossws-1.2.1.GA
svn merge -r62241:62245 https://svn.jboss.org/repos/jbossas/trunk
svn merge -r62254:62257 https://svn.jboss.org/repos/jbossas/trunk
svn merge -r62272:62273 https://svn.jboss.org/repos/jbossas/trunk
svn merge -r62277:62292 https://svn.jboss.org/repos/jbossas/trunk
svn merge -r62333:62345 https://svn.jboss.org/repos/jbossas/trunk
Modified: branches/JBossWS_2_0_0_GA/build/build-distr.xml
===================================================================
--- branches/JBossWS_2_0_0_GA/build/build-distr.xml 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/build/build-distr.xml 2007-07-01 21:08:34 UTC (rev 63759)
@@ -1814,6 +1814,9 @@
<fileset dir="${jboss.jbossxb.lib}">
<include name="jboss-xml-binding.jar"/>
</fileset>
+ <fileset dir="${jboss.security.spi.lib}">
+ <include name="jboss-security-spi.jar"/>
+ </fileset>
<fileset dir="${sun.jaf.lib}">
<include name="activation.jar"/>
</fileset>
Modified: branches/JBossWS_2_0_0_GA/build/build-thirdparty.xml
===================================================================
--- branches/JBossWS_2_0_0_GA/build/build-thirdparty.xml 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/build/build-thirdparty.xml 2007-07-01 21:08:34 UTC (rev 63759)
@@ -92,7 +92,7 @@
<componentref name="jboss/common-logging-spi" version="2.0.2.GA"/>
<componentref name="jboss/jaxr" version="1.2.0.GA"/>
<componentref name="jboss/jbossxb" version="2.0.0.CR2"/>
- <componentref name="jboss/jbossws-jboss50" version="2.0.0.DEV"/>
+ <componentref name="jboss/jbossws-jboss50" version="1.2.1.GA"/>
<componentref name="jboss/jbossws-wsconsume-impl" version="2.0.0"/>
<componentref name="jboss/messaging" version="1.2.0.SP.snapshot.aop2beta"/>
<componentref name="jboss/microcontainer" version="2.0.0.Beta3"/>
Modified: branches/JBossWS_2_0_0_GA/build/build.xml
===================================================================
--- branches/JBossWS_2_0_0_GA/build/build.xml 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/build/build.xml 2007-07-01 21:08:34 UTC (rev 63759)
@@ -794,6 +794,7 @@
<include name="jboss-j2ee.jar"/>
<include name="jboss-j2se.jar"/>
<include name="jboss-remoting.jar"/>
+ <include name="jboss-security-spi.jar"/>
<include name="jboss-serialization.jar"/>
<include name="jbossmqha.jar"/>
<include name="jmx-connector-client-factory.jar"/>
@@ -801,7 +802,6 @@
<include name="xmlsec.jar"/>
<include name="jboss-messaging.jar"/>
<!-- client excludes -->
- <exclude name="jbossws14-client.jar"/>
<exclude name="jbossws-client.jar"/>
</srcfiles>
</uptodate>
@@ -834,6 +834,7 @@
<include name="jboss-j2ee.jar"/>
<include name="jboss-j2se.jar"/>
<include name="jboss-remoting.jar"/>
+ <include name="jboss-security-spi.jar"/>
<include name="jboss-serialization.jar"/>
<!-- Do not include, otherwise jbossws cannot be a drop in replacement.
<include name="jboss-xml-binding.jar"/>
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -23,6 +23,7 @@
import java.io.BufferedInputStream;
import java.io.DataInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
@@ -55,6 +56,7 @@
import org.jboss.ejb3.metamodel.JBossDDObjectFactory;
import org.jboss.logging.Logger;
import org.jboss.virtual.VirtualFile;
+import org.jboss.xb.binding.JBossXBException;
/**
* An EjbModule represents a collection of beans that are deployed as a unit.
@@ -64,7 +66,6 @@
*/
public abstract class Ejb3Deployment
{
-
private static final Logger log = Logger.getLogger(Ejb3Deployment.class);
public static final String ACTUAL_ENTITY_MANAGER_FACTORY_CONTEXT = "java:/ActualEntityManagerFactories";
public static final String MANAGED_ENTITY_FACTORY_CONTEXT = "java:/managedEntityFactories";
@@ -76,8 +77,7 @@
protected boolean hasEntities;
protected List<String> explicitEntityClasses = new ArrayList<String>();
- protected List<PersistenceUnitDeployment> persistenceUnitDeployments = new ArrayList<PersistenceUnitDeployment>();
-;
+ protected List<PersistenceUnitDeployment> persistenceUnitDeployments = new ArrayList<PersistenceUnitDeployment>();;
protected String defaultSLSBDomain = "Stateless Bean";
protected String defaultSFSBDomain = "Stateful Bean";
@@ -144,7 +144,6 @@
return defaultSLSBDomain;
}
-
/**
* Returns a partial MBean attribute name of the form
* ",ear=foo.ear,jar=foo.jar"
@@ -154,7 +153,8 @@
public String getScopeKernelName()
{
String scopedKernelName = "";
- if (deploymentScope != null) scopedKernelName += ",ear=" + deploymentScope.getShortName();
+ if (deploymentScope != null)
+ scopedKernelName += ",ear=" + deploymentScope.getShortName();
scopedKernelName += ",jar=" + unit.getShortName();
return scopedKernelName;
}
@@ -226,7 +226,7 @@
public Container getContainer(ObjectName name)
{
- return (Container) ejbContainers.get(name);
+ return (Container)ejbContainers.get(name);
}
public java.util.Map getEjbContainers()
@@ -234,7 +234,6 @@
return ejbContainers;
}
-
public PersistenceUnitDeployment getPersistenceUnitDeployment(String unitName) throws NameNotFoundException
{
return persistenceUnitResolver.getPersistenceUnitDeployment(unitName);
@@ -250,7 +249,6 @@
return persistenceUnitDeployments;
}
-
public EJBContainer getEjbContainer(String ejbLink, Class businessIntf)
{
return ejbRefResolver.getEjbContainer(ejbLink, businessIntf);
@@ -276,8 +274,7 @@
return ejbRefResolver.getEjbJndiName(businessIntf);
}
- protected void processEJBContainerMetadata(Container container)
- throws Exception
+ protected void processEJBContainerMetadata(Container container) throws Exception
{
ObjectName on = container.getObjectName();
ejbContainers.put(on, container);
@@ -286,8 +283,7 @@
}
- protected void registerEJBContainer(Container container)
- throws Exception
+ protected void registerEJBContainer(Container container) throws Exception
{
ObjectName on = container.getObjectName();
String name = on.getCanonicalName();
@@ -299,7 +295,6 @@
protected abstract void putJaccInService(PolicyConfiguration pc, DeploymentUnit unit);
-
/**
* Create all EJB containers and Persistence Units
* The only things that should be initialized is metadata that does not need access to any
@@ -319,8 +314,7 @@
initializePersistenceUnits();
- log.debug("EJB3 deployment time took: "
- + (System.currentTimeMillis() - start));
+ log.debug("EJB3 deployment time took: " + (System.currentTimeMillis() - start));
}
public void start() throws Exception
@@ -331,13 +325,13 @@
for (Object o : ejbContainers.values())
{
- Container con = (Container) o;
+ Container con = (Container)o;
processEJBContainerMetadata(con);
}
for (Object o : ejbContainers.values())
{
- Container con = (Container) o;
+ Container con = (Container)o;
registerEJBContainer(con);
}
@@ -360,7 +354,8 @@
protected void deploy() throws Exception
{
Ejb3HandlerFactory factory = Ejb3HandlerFactory.getInstance(this);
- if (unit.getUrl() != null) deployUrl(factory);
+ if (unit.getUrl() != null)
+ deployUrl(factory);
if (unit.getClasses() != null)
{
@@ -375,19 +370,18 @@
deployElement(stream, factory, initialContext);
}
}
-
+
deployBeansFromLib(initialContext);
}
- protected void deployUrl(Ejb3HandlerFactory factory)
- throws Exception
+ protected void deployUrl(Ejb3HandlerFactory factory) throws Exception
{
// make sure we are not deploying ejbs from client jar
List<VirtualFile> clientDescriptors = unit.getResources(new org.jboss.ejb3.ClientDescriptorFileFilter());
-
+
if (clientDescriptors.size() > 0)
return;
-
+
InitialContext ctx = initialContext;
// need to look into every entry in the archive to see if anybody has tags
// defined.
@@ -399,8 +393,7 @@
}
}
- protected void deployElement(InputStream stream, Ejb3HandlerFactory factory, InitialContext ctx)
- throws Exception
+ protected void deployElement(InputStream stream, Ejb3HandlerFactory factory, InitialContext ctx) throws Exception
{
DataInputStream dstream = new DataInputStream(new BufferedInputStream(stream));
ClassFile cf = null;
@@ -417,18 +410,15 @@
deployElement(factory, cf, ctx);
}
-
- protected void deployBeansFromLib(InitialContext ctx)
- throws Exception
+
+ protected void deployBeansFromLib(InitialContext ctx) throws Exception
{
- EjbJarDD dd = EjbJarDDObjectFactory.parse(getDeploymentUnit().getEjbJarXml());
- dd = JBossDDObjectFactory.parse(this.getDeploymentUnit().getJbossXml(), dd);
-
+ EjbJarDD dd = getMetaDataFomLib();
if (dd != null)
{
Ejb3DescriptorHandler handler = new Ejb3DescriptorHandler(this, dd);
handler.setCtxProperties(unit.getJndiProperties());
-
+
Map<String, Container> localContainers = new HashMap<String, Container>();
Iterator<Container> containerIterator = ejbContainers.values().iterator();
while (containerIterator.hasNext())
@@ -436,23 +426,29 @@
Container container = containerIterator.next();
localContainers.put(container.getEjbName(), container);
}
-
+
List<Container> containers = handler.getContainers(this, localContainers);
for (Container con : containers)
{
// EJBContainer has finished with all metadata initialization from XML files and such.
// this is really a hook to do some processing after XML has been set up and before
// and processing of dependencies and such.
- ((EJBContainer) con).instantiated();
+ ((EJBContainer)con).instantiated();
this.ejbContainers.put(con.getObjectName(), con);
Ejb3Registry.register(con);
}
}
}
- protected void deployElement(Ejb3HandlerFactory factory, ClassFile cf, InitialContext ctx)
- throws Exception
- {
+ protected EjbJarDD getMetaDataFomLib() throws JBossXBException, IOException
+ {
+ EjbJarDD dd = EjbJarDDObjectFactory.parse(getDeploymentUnit().getEjbJarXml());
+ dd = JBossDDObjectFactory.parse(this.getDeploymentUnit().getJbossXml(), dd);
+ return dd;
+ }
+
+ protected void deployElement(Ejb3HandlerFactory factory, ClassFile cf, InitialContext ctx) throws Exception
+ {
Ejb3Handler handler = factory.createHandler(cf);
handler.setCtxProperties(unit.getJndiProperties());
@@ -464,22 +460,22 @@
// EJBContainer has finished with all metadata initialization from XML files and such.
// this is really a hook to do some processing after XML has been set up and before
// and processing of dependencies and such.
- ((EJBContainer) con).instantiated();
+ ((EJBContainer)con).instantiated();
this.ejbContainers.put(con.getObjectName(), con);
Ejb3Registry.register(con);
}
}
}
- protected void initializePersistenceUnits()
- throws Exception
+ protected void initializePersistenceUnits() throws Exception
{
URL persistenceXmlUrl = null;
persistenceXmlUrl = unit.getPersistenceXml();
-
+
hasEntities = persistenceXmlUrl != null;
- if (!hasEntities) return;
+ if (!hasEntities)
+ return;
if (unit.getClasses() != null)
{
@@ -494,12 +490,14 @@
// scope the unitName if this is an ejb archive
// todo revert to this: List<PersistenceMetadata> persistenceMetadata = PersistenceXmlLoader.deploy(persistenceXmlUrl, new HashMap(), new EJB3DTDEntityResolver());
- List<PersistenceMetadata> persistenceMetadata = PersistenceXmlLoader.deploy(persistenceXmlUrl, new HashMap(), new EJB3DTDEntityResolver(), PersistenceUnitTransactionType.JTA);
+ List<PersistenceMetadata> persistenceMetadata = PersistenceXmlLoader.deploy(persistenceXmlUrl, new HashMap(), new EJB3DTDEntityResolver(),
+ PersistenceUnitTransactionType.JTA);
for (PersistenceMetadata metadata : persistenceMetadata)
{
String earShortName = deploymentScope == null ? null : deploymentScope.getShortName();
boolean isScoped = ejbContainers.size() > 0;
- PersistenceUnitDeployment deployment = new PersistenceUnitDeployment(initialContext, this, explicitEntityClasses, persistenceXmlUrl, metadata, earShortName, unit.getShortName(), isScoped);
+ PersistenceUnitDeployment deployment = new PersistenceUnitDeployment(initialContext, this, explicitEntityClasses, persistenceXmlUrl, metadata, earShortName,
+ unit.getShortName(), isScoped);
PersistenceUnitRegistry.register(deployment);
persistenceUnitDeployments.add(deployment);
}
@@ -509,7 +507,8 @@
protected void startPersistenceUnits()
{
- if (persistenceUnitDeployments == null) return;
+ if (persistenceUnitDeployments == null)
+ return;
for (PersistenceUnitDeployment entityDeployment : persistenceUnitDeployments)
{
@@ -524,7 +523,8 @@
protected void stopPersistenceUnits()
{
- if (persistenceUnitDeployments == null) return;
+ if (persistenceUnitDeployments == null)
+ return;
for (PersistenceUnitDeployment entityDeployment : persistenceUnitDeployments)
{
@@ -550,7 +550,7 @@
{
try
{
- ObjectName on = (ObjectName) o;
+ ObjectName on = (ObjectName)o;
kernelAbstraction.uninstall(on.getCanonicalName());
}
catch (Exception e)
@@ -564,15 +564,15 @@
public void destroy() throws Exception
{
undeploy();
-
+
PolicyConfigurationFactory pcFactory = PolicyConfigurationFactory.getPolicyConfigurationFactory();
PolicyConfiguration pc = pcFactory.getPolicyConfiguration(getJaccContextId(), true);
pc.delete();
}
-
+
private void undeploy()
{
- for(Container container : ejbContainers.values())
+ for (Container container : ejbContainers.values())
{
Ejb3Registry.unregister(container);
}
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -22,8 +22,40 @@
package org.jboss.ejb3;
import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
import javassist.bytecode.ClassFile;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.security.DeclareRoles;
+import javax.annotation.security.DenyAll;
+import javax.annotation.security.PermitAll;
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Init;
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.MessageDriven;
+import javax.ejb.PostActivate;
+import javax.ejb.PrePassivate;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Remove;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.ejb.TransactionManagement;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.ExcludeClassInterceptors;
+import javax.interceptor.ExcludeDefaultInterceptors;
+import javax.interceptor.Interceptors;
+
import org.jboss.annotation.IgnoreDependency;
import org.jboss.annotation.IgnoreDependencyImpl;
import org.jboss.annotation.ejb.Clustered;
@@ -72,7 +104,6 @@
import org.jboss.annotation.ejb.cache.simple.PersistenceManagerImpl;
import org.jboss.annotation.internal.DefaultInterceptorMarker;
import org.jboss.annotation.internal.DefaultInterceptorMarkerImpl;
-import org.jboss.annotation.security.RunAsPrincipal;
import org.jboss.annotation.security.RunAsPrincipalImpl;
import org.jboss.annotation.security.SecurityDomain;
import org.jboss.annotation.security.SecurityDomainImpl;
@@ -134,37 +165,6 @@
import org.jboss.metamodel.descriptor.RunAs;
import org.jboss.metamodel.descriptor.SecurityRole;
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.annotation.security.DeclareRoles;
-import javax.annotation.security.DenyAll;
-import javax.annotation.security.PermitAll;
-import javax.annotation.security.RolesAllowed;
-import javax.ejb.Init;
-import javax.ejb.Local;
-import javax.ejb.LocalHome;
-import javax.ejb.MessageDriven;
-import javax.ejb.PostActivate;
-import javax.ejb.PrePassivate;
-import javax.ejb.Remote;
-import javax.ejb.RemoteHome;
-import javax.ejb.Remove;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.ejb.TransactionManagement;
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.ExcludeClassInterceptors;
-import javax.interceptor.ExcludeDefaultInterceptors;
-import javax.interceptor.Interceptors;
-import java.lang.reflect.Member;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
/**
* @version <tt>$Revision$</tt>
* @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3JBoss5Deployment.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3JBoss5Deployment.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3JBoss5Deployment.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -21,6 +21,8 @@
*/
package org.jboss.ejb3.deployers;
+import java.io.IOException;
+
import org.jboss.ejb3.DependencyPolicy;
import org.jboss.ejb3.DeploymentUnit;
import org.jboss.ejb3.DeploymentScope;
@@ -28,9 +30,13 @@
import org.jboss.ejb3.JmxDependencyPolicy;
import org.jboss.ejb3.MCKernelAbstraction;
import org.jboss.ejb3.MCDependencyPolicy;
+import org.jboss.ejb3.metamodel.EjbJarDD;
+import org.jboss.ejb3.metamodel.EjbJarDDObjectFactory;
+import org.jboss.ejb3.metamodel.JBossDDObjectFactory;
import org.jboss.ejb3.security.JaccHelper;
import org.jboss.kernel.Kernel;
import org.jboss.logging.Logger;
+import org.jboss.xb.binding.JBossXBException;
import javax.management.MBeanServer;
import javax.security.jacc.PolicyConfiguration;
@@ -43,43 +49,47 @@
*/
public class Ejb3JBoss5Deployment extends Ejb3Deployment
{
- private org.jboss.deployers.spi.deployer.DeploymentUnit deploymentInfo;
+ private org.jboss.deployers.spi.deployer.DeploymentUnit jbossUnit;
private static final Logger log = Logger.getLogger(Ejb3JBoss5Deployment.class);
- public Ejb3JBoss5Deployment(DeploymentUnit du, Kernel kernel, MBeanServer mbeanServer, org.jboss.deployers.spi.deployer.DeploymentUnit di, DeploymentScope deploymentScope)
+ public Ejb3JBoss5Deployment(DeploymentUnit ejb3Unit, Kernel kernel, MBeanServer mbeanServer, org.jboss.deployers.spi.deployer.DeploymentUnit jbossUnit, DeploymentScope deploymentScope)
{
- super(du, deploymentScope);
- this.deploymentInfo = di;
+ super(ejb3Unit, deploymentScope);
+ this.jbossUnit = jbossUnit;
kernelAbstraction = new MCKernelAbstraction(kernel, mbeanServer);
// todo maybe mbeanServer should be injected?
this.mbeanServer = mbeanServer;
}
+ protected EjbJarDD getMetaDataFomLib() throws JBossXBException, IOException
+ {
+ EjbJarDD jarDD = super.getMetaDataFomLib();
+ if (jarDD != null)
+ jbossUnit.addAttachment(EjbJarDD.class, jarDD);
+ return jarDD;
+ }
+
protected PolicyConfiguration createPolicyConfiguration() throws Exception
{
return JaccHelper.initialiseJacc(getJaccContextId());
-
}
- protected void putJaccInService(PolicyConfiguration pc, DeploymentUnit unit)
+ protected void putJaccInService(PolicyConfiguration pc, DeploymentUnit ejb3Unit)
{
try
{
- JaccHelper.putJaccInService(pc, deploymentInfo);
+ JaccHelper.putJaccInService(pc, jbossUnit);
}
catch (Exception e)
{
throw new RuntimeException(e);
}
-
}
public DependencyPolicy createDependencyPolicy()
{
return new JBoss5DependencyPolicy();
}
-
-
}
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDD.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -18,16 +18,13 @@
* 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.metamodel;
import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
import org.jboss.logging.Logger;
-
/**
* Represents the ejb-jar.xml deployment descriptor for the 2.1 schema
*
@@ -37,7 +34,7 @@
public class EjbJarDD
{
private static final Logger log = Logger.getLogger(EjbJarDD.class);
-
+
// ejb-jar.xml
private String version;
@@ -46,7 +43,7 @@
private Relationships relationships;
private AssemblyDescriptor assemblyDescriptor;
-
+
private Interceptors interceptors;
// jboss.xml
@@ -59,19 +56,19 @@
// both
private EnterpriseBeans enterpriseBeans;
- private List<Webservices> webservices = new ArrayList<Webservices>();
+ private Webservices webservices;
public void addResourceManager(ResourceManager manager)
{
resourceManagers.put(manager.getResourceName(), manager);
}
-
+
public String resolveResourceManager(String resourceName)
{
ResourceManager manager = resourceManagers.get(resourceName);
if (manager != null)
return manager.getResourceJndiName();
-
+
return null;
}
@@ -84,7 +81,7 @@
{
this.securityDomain = securityDomain;
}
-
+
public String getUnauthenticatedPrincipal()
{
return unauthenticatedPrincipal;
@@ -94,7 +91,7 @@
{
this.unauthenticatedPrincipal = unauthenticatedPrincipal;
}
-
+
public String getJmxName()
{
return jmxName;
@@ -134,7 +131,7 @@
{
this.enterpriseBeans = enterpriseBeans;
}
-
+
public Interceptors getInterceptors()
{
return interceptors;
@@ -165,11 +162,16 @@
this.assemblyDescriptor = assemblyDescriptor;
}
- public List<Webservices> getWebservices()
+ public Webservices getWebservices()
{
return webservices;
}
+ public void setWebservices(Webservices webservices)
+ {
+ this.webservices = webservices;
+ }
+
public String toString()
{
StringBuffer sb = new StringBuffer(100);
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -22,18 +22,19 @@
package org.jboss.ejb3.metamodel;
import java.util.ArrayList;
-import java.util.List;
import java.util.Collection;
import java.util.HashSet;
+import java.util.List;
+
import javax.ejb.TransactionManagementType;
+
import org.jboss.logging.Logger;
-
import org.jboss.metadata.SecurityRoleRefMetaData;
import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
import org.jboss.metamodel.descriptor.InjectionTarget;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.metamodel.descriptor.MessageDestinationRef;
import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.metamodel.descriptor.ResourceRef;
/**
* Represents an EJB element of the ejb-jar.xml deployment descriptor for the
@@ -93,6 +94,8 @@
private PoolConfig poolConfig = null;
+ private Ejb3PortComponent portComponent;
+
/** The security-role-ref element(s) info */
private ArrayList<SecurityRoleRefMetaData> securityRoleReferences = new ArrayList<SecurityRoleRefMetaData>();
@@ -384,6 +387,16 @@
this.securityRoleReferences = securityRoleReferences;
}
+ public Ejb3PortComponent getPortComponent()
+ {
+ return portComponent;
+ }
+
+ public void setPortComponent(Ejb3PortComponent portComponent)
+ {
+ this.portComponent = portComponent;
+ }
+
public String toString()
{
StringBuffer sb = new StringBuffer(100);
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -53,72 +53,72 @@
private HashMap<String, EnterpriseBean> enterpriseBeans = new HashMap();
private EnterpriseBean currentEjb;
-
+
public void setPoolConfig(PoolConfig config)
{
currentEjb.setPoolConfig(config);
}
-
+
public void setDefaultActivationConfig(ActivationConfig config)
{
((MessageDrivenBean)currentEjb).setDefaultActivationConfig(config);
}
-
+
public void setCacheConfig(CacheConfig config)
{
((SessionEnterpriseBean)currentEjb).setCacheConfig(config);
}
-
+
public void setClustered(String clustered)
{
((SessionEnterpriseBean)currentEjb).setClustered(clustered);
}
-
+
public void setConcurrent(String concurrent)
{
((SessionEnterpriseBean)currentEjb).setConcurrent(concurrent);
}
-
+
public void addJndiRef(JndiRef ref)
{
currentEjb.addJndiRef(ref);
}
-
+
public void addXmlAnnotation(XmlAnnotation xmlAnnotation)
{
currentEjb.addXmlAnnotation(xmlAnnotation);
}
-
+
public void addRemoteBinding(RemoteBinding binding)
{
currentEjb.addRemoteBinding(binding);
}
-
+
public void addIgnoreDependency(InjectionTarget ignore)
{
currentEjb.addIgnoreDependency(ignore);
}
-
+
public void addResourceRef(ResourceRef ref)
{
currentEjb.mergeResourceRef(ref);
}
-
+
public void addResourceEnvRef(ResourceEnvRef ref)
{
currentEjb.mergeResourceEnvRef(ref);
}
-
+
public void addMessageDestinationRef(MessageDestinationRef ref)
{
currentEjb.mergeMessageDestinationRef(ref);
}
-
+
public void addServiceRef(ServiceRefMetaData ref)
{
currentEjb.addServiceRef(ref);
}
-
+
public ServiceRefMetaData getServiceRef(String name)
{
return currentEjb.getServiceRef(name);
@@ -126,10 +126,8 @@
public void addPortComponent(Ejb3PortComponent portComp)
{
- if(! (currentEjb instanceof SessionEnterpriseBean) )
- throw new IllegalArgumentException("Cannot add portComponent to " + currentEjb);
- ((SessionEnterpriseBean)currentEjb).getPortComponents().add(portComp);
- }
+ currentEjb.setPortComponent(portComp);
+ }
public void setMethodAttributes(MethodAttributes attributes)
{
@@ -155,22 +153,22 @@
{
currentEjb.updateEjbLocalRef(ref);
}
-
+
public void updateResourceRef(ResourceRef ref)
{
currentEjb.updateResourceRef(ref);
}
-
+
public void updateResourceEnvRef(ResourceEnvRef ref)
{
currentEjb.updateResourceEnvRef(ref);
}
-
+
public void updateMessageDestinationRef(MessageDestinationRef ref)
{
currentEjb.updateMessageDestinationRef(ref);
}
-
+
public void setResourceAdapterName(String name)
{
((MessageDrivenBean)currentEjb).setResourceAdaptorName(name);
@@ -190,7 +188,7 @@
{
((MessageDrivenBean)currentEjb).setMdbPassword(name);
}
-
+
public void setMdbSubscriptionId(String id)
{
((MessageDrivenBean)currentEjb).setMdbSubscriptionId(id);
@@ -220,7 +218,7 @@
{
currentEjb.setJndiName(jndiName);
}
-
+
public void setHomeJndiName(String homeJndiName)
{
currentEjb.setHomeJndiName(homeJndiName);
@@ -235,7 +233,7 @@
{
currentEjb.setLocalJndiName(jndiName);
}
-
+
public void setLocalHomeJndiName(String homeJndiName)
{
currentEjb.setLocalHomeJndiName(homeJndiName);
@@ -243,21 +241,23 @@
public EnterpriseBean createEjbByEjbName(String ejbName, Class ejbClass)
{
- EnterpriseBean ejb = (EnterpriseBean) enterpriseBeans.get(ejbName);
+ EnterpriseBean ejb = (EnterpriseBean)enterpriseBeans.get(ejbName);
if (ejb != null)
return ejb;
-
- try
+
+ try
{
ejb = (EnterpriseBean)ejbClass.newInstance();
ejb.setEjbName(ejbName);
enterpriseBeans.put(ejbName, ejb);
}
- catch (Exception e){}
-
+ catch (Exception e)
+ {
+ }
+
return ejb;
}
-
+
public EnterpriseBean findEjbByEjbName(String ejbName)
{
return enterpriseBeans.get(ejbName);
@@ -270,7 +270,7 @@
Iterator ejbs = enterpriseBeans.values().iterator();
while (ejbs.hasNext())
{
- EnterpriseBean ejb = (EnterpriseBean) ejbs.next();
+ EnterpriseBean ejb = (EnterpriseBean)ejbs.next();
String ejbClassName = ejb.getEjbClass();
if (ejbClassName != null && ejbClassName.equals(className))
result.add(ejb);
@@ -283,7 +283,7 @@
Iterator ejbs = enterpriseBeans.values().iterator();
while (ejbs.hasNext())
{
- EnterpriseBean ejb = (EnterpriseBean) ejbs.next();
+ EnterpriseBean ejb = (EnterpriseBean)ejbs.next();
if (ejb.getRemote() != null && ejb.getRemote().equals(remote))
return ejb;
}
@@ -295,7 +295,7 @@
Iterator ejbs = enterpriseBeans.values().iterator();
while (ejbs.hasNext())
{
- EnterpriseBean ejb = (EnterpriseBean) ejbs.next();
+ EnterpriseBean ejb = (EnterpriseBean)ejbs.next();
if (ejb.getLocal() != null && ejb.getLocal().equals(local))
return ejb;
}
@@ -307,10 +307,10 @@
return enterpriseBeans.values();
}
-/* public void setEnterpriseBeans(List enterpriseBeans)
- {
- this.enterpriseBeans = enterpriseBeans;
- }*/
+ /* public void setEnterpriseBeans(List enterpriseBeans)
+ {
+ this.enterpriseBeans = enterpriseBeans;
+ }*/
public void addEnterpriseBean(EnterpriseBean ejb)
{
@@ -333,10 +333,9 @@
if (!(o instanceof EnterpriseBeans))
return false;
- final EnterpriseBeans ejbs = (EnterpriseBeans) o;
+ final EnterpriseBeans ejbs = (EnterpriseBeans)o;
- if (enterpriseBeans != null ? !enterpriseBeans
- .equals(ejbs.enterpriseBeans) : ejbs.enterpriseBeans != null)
+ if (enterpriseBeans != null ? !enterpriseBeans.equals(ejbs.enterpriseBeans) : ejbs.enterpriseBeans != null)
return false;
return true;
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -136,10 +136,14 @@
child = new ResourceManager();
}
else if (localName.equals("webservices"))
- {
- child = new Webservices();
+ {
+ child = dd.getWebservices();
+ if (child == null)
+ {
+ dd.setWebservices(new Webservices());
+ child = dd.getWebservices();
+ }
}
-
return child;
}
@@ -221,12 +225,12 @@
public Object newChild(Webservices webservices, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
Object child = null;
-
+
if (localName.equals("webservice-description"))
{
child = new WebserviceDescription();
}
-
+
return child;
}
@@ -316,6 +320,11 @@
ejbClass = MessageDrivenBean.class;
child = ejbs;
}
+ else if (localName.equals("ejb"))
+ {
+ ejbClass = GenericBean.class;
+ child = ejbs;
+ }
else if (localName.equals("service"))
{
child = new Service();
@@ -324,12 +333,6 @@
{
child = new Consumer();
}
- else if (localName.equals("ejb"))
- {
- log.trace("found ejb");
- ejbClass = GenericBean.class;
- child = ejbs;
- }
else if (localName.equals("method-attributes"))
{
child = new MethodAttributes();
@@ -362,11 +365,10 @@
{
child = new ActivationConfig();
}
- else if (localName.equals("port-component") && ejbClass == SessionEnterpriseBean.class)
+ else if (localName.equals("port-component"))
{
child = new Ejb3PortComponent();
}
-
return child;
}
@@ -400,7 +402,7 @@
public void addChild(SessionEnterpriseBean parent, Ejb3PortComponent portComp, UnmarshallingContext navigator, String namespaceURI, String localName)
{
- parent.getPortComponents().add(portComp);
+ parent.setPortComponent(portComp);
}
public void addChild(XmlAnnotation parent, NameValuePair property, UnmarshallingContext navigator, String namespaceURI, String localName)
@@ -637,7 +639,7 @@
*/
public void addChild(Webservices parent, WebserviceDescription desc, UnmarshallingContext navigator, String namespaceURI, String localName)
{
- parent.addWebserviceDescription(desc);
+ parent.getWebserviceDescriptions().add(desc);
}
/**
@@ -661,7 +663,7 @@
*/
public void addChild(EjbJarDD parent, Webservices webservices, UnmarshallingContext navigator, String namespaceURI, String localName)
{
- parent.getWebservices().add(webservices);
+ parent.setWebservices(webservices);
}
/**
@@ -1126,17 +1128,6 @@
/**
* Called when a child element with simple content is read for DD.
*/
- public void setValue(Webservices webservices, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("context-root"))
- {
- webservices.setContextRoot(value);
- }
- }
-
- /**
- * Called when a child element with simple content is read for DD.
- */
public void setValue(Ejb3PortComponent portComp, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
// port-component (port-component-name, port-component-uri?, auth-method?,
@@ -1165,11 +1156,22 @@
/**
* Called when a child element with simple content is read for DD.
*/
+ public void setValue(Webservices webservices, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("context-root"))
+ {
+ webservices.setContextRoot(value);
+ }
+ }
+
+ /**
+ * Called when a child element with simple content is read for DD.
+ */
public void setValue(WebserviceDescription desc, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
if (localName.equals("webservice-description-name"))
{
- desc.setName(value);
+ desc.setDescriptionName(value);
}
else if (localName.equals("config-name"))
{
@@ -1181,7 +1183,7 @@
}
else if (localName.equals("wsdl-publish-location"))
{
- desc.setLocation(value);
+ desc.setWsdlPublishLocation(value);
}
}
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -18,15 +18,14 @@
* 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.metamodel;
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
+
import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.PersistenceUnitRef;
-
/**
* Represents a Session EJB element of the ejb-jar.xml deployment descriptor for
* the 1.4 schema
@@ -36,8 +35,7 @@
*/
public class SessionEnterpriseBean extends EnterpriseBean
{
- private static final Logger log = Logger
- .getLogger(SessionEnterpriseBean.class);
+ private static final Logger log = Logger.getLogger(SessionEnterpriseBean.class);
public static final String STATELESS = "Stateless";
@@ -52,50 +50,48 @@
private Method prePassivate;
private List<RemoveMethod> removeMethods = new ArrayList<RemoveMethod>();
private List<InitMethod> initMethods = new ArrayList<InitMethod>();
-
+
private String clustered = null;
private ClusterConfig clusterConfig = null;
private CacheConfig cacheConfig = null;
-
+
private String concurrent = null;
- private List<Ejb3PortComponent> portComponents = new ArrayList<Ejb3PortComponent>();
-
public CacheConfig getCacheConfig()
{
return cacheConfig;
}
-
+
public void setCacheConfig(CacheConfig cacheConfig)
{
this.cacheConfig = cacheConfig;
}
-
+
public String getConcurrent()
{
return concurrent;
}
-
+
public void setConcurrent(String concurrent)
{
this.concurrent = concurrent;
}
-
+
public String getClustered()
{
return clustered;
}
-
+
public void setClustered(String clustered)
{
this.clustered = clustered;
}
-
+
public ClusterConfig getClusterConfig()
{
return clusterConfig;
}
-
+
public void setClusterConfig(ClusterConfig clusterConfig)
{
this.clusterConfig = clusterConfig;
@@ -105,17 +101,17 @@
{
return removeMethods;
}
-
+
public void addRemoveMethod(RemoveMethod method)
{
removeMethods.add(method);
}
-
+
public List<InitMethod> getInitMethods()
{
return initMethods;
}
-
+
public void addInitMethod(InitMethod method)
{
initMethods.add(method);
@@ -153,7 +149,8 @@
public Method getPostActivate()
{
- if (sessionType.equals(STATELESS)) return null;
+ if (sessionType.equals(STATELESS))
+ return null;
return postActivate;
}
@@ -184,7 +181,8 @@
public Method getPrePassivate()
{
- if (sessionType.equals(STATELESS)) return null;
+ if (sessionType.equals(STATELESS))
+ return null;
return prePassivate;
}
@@ -193,12 +191,6 @@
this.prePassivate = prePassivate;
}
-
- public List<Ejb3PortComponent> getPortComponents()
- {
- return portComponents;
- }
-
public String toString()
{
StringBuffer sb = new StringBuffer(100);
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/WebserviceDescription.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/WebserviceDescription.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/WebserviceDescription.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -1,20 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metamodel;
+// $Id: $
+
public class WebserviceDescription
{
- String name;
- String configName;
- String configFile;
- String location;
+ private String descriptionName;
+ private String configName;
+ private String configFile;
+ private String wsdlPublishLocation;
- public String getName()
+ public String getConfigFile()
{
- return name;
+ return configFile;
}
- public void setName(String name)
+ public void setConfigFile(String configFile)
{
- this.name = name;
+ this.configFile = configFile;
}
public String getConfigName()
@@ -27,28 +50,23 @@
this.configName = configName;
}
- public String getConfigFile()
+ public String getDescriptionName()
{
- return configFile;
+ return descriptionName;
}
- public void setConfigFile(String configFile)
+ public void setDescriptionName(String descriptionName)
{
- this.configFile = configFile;
+ this.descriptionName = descriptionName;
}
- public String getLocation()
+ public String getWsdlPublishLocation()
{
- return location;
+ return wsdlPublishLocation;
}
- public void setLocation(String location)
+ public void setWsdlPublishLocation(String wsdlPublishLocation)
{
- this.location = location;
+ this.wsdlPublishLocation = wsdlPublishLocation;
}
-
- public String serialize()
- {
- throw new IllegalArgumentException("Not implemented");
- }
}
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/Webservices.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/Webservices.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/metamodel/Webservices.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -1,23 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metamodel;
-import java.net.URL;
+//$Id: $
+
import java.util.ArrayList;
-import java.util.Map;
+import java.util.List;
public class Webservices
{
- // The required <webservice-description> elements
- private ArrayList<WebserviceDescription> webserviceDescriptions = new ArrayList<WebserviceDescription>();
-
- // The URL to the webservices.xml descriptor
- private URL descriptorURL;
-
private String contextRoot;
+ private List<WebserviceDescription> webserviceDescriptions = new ArrayList<WebserviceDescription>();
- public Webservices()
- {
- }
-
public String getContextRoot()
{
return contextRoot;
@@ -28,74 +41,8 @@
this.contextRoot = contextRoot;
}
- public Webservices(URL descriptorURL)
+ public List<WebserviceDescription> getWebserviceDescriptions()
{
- this.descriptorURL = descriptorURL;
+ return webserviceDescriptions;
}
-
- public URL getDescriptorURL()
- {
- return descriptorURL;
- }
-
- public void addWebserviceDescription(WebserviceDescription webserviceDescription)
- {
- webserviceDescriptions.add(webserviceDescription);
- }
-
- public WebserviceDescription[] getWebserviceDescriptions()
- {
- WebserviceDescription[] array = new WebserviceDescription[webserviceDescriptions.size()];
- webserviceDescriptions.toArray(array);
- return array;
- }
-
- //Serialize as a String
- public String serialize()
- {
- //Construct the webservices.xml definitions
- StringBuilder buffer = new StringBuilder();
-
- // header: opening webservices tag
- createHeader(buffer);
-
- // webservice-description subelements
- for (WebserviceDescription wm : webserviceDescriptions)
- buffer.append(wm.serialize());
-
- // closing webservices tag
- buffer.append("</webservices>");
- return buffer.toString();
- }
-
- private void createHeader(StringBuilder buf)
- {
- throw new IllegalArgumentException("Not implemented");
-
- /*buf.append("<webservices xmlns='http://java.sun.com/xml/ns/j2ee'");
- buf.append(" xmlns:xsi='").append(Constants.NS_SCHEMA_XSI).append('\'');
- buf.append(" xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'");
- buf.append(" version='1.1'>");
- */
- }
-
- private String createAlternatePrefix(String prefix, Map<String, String> namespaces)
- {
- // allocate working buffer
- StringBuilder altPrefixBuilder = new StringBuilder(prefix);
- // remember original length
- int baseLength = prefix.length();
-
- for (int i = 2; i < Integer.MAX_VALUE; i++)
- {
- // append a natural number to the original prefix
- String altPrefix = altPrefixBuilder.append(i).toString();
- // if the alternate prefix does not match an existing one, we're done
- if (!namespaces.containsKey(altPrefix))
- return altPrefix;
- // truncate buffer to original length
- altPrefixBuilder.setLength(baseLength);
- }
- throw new IllegalArgumentException("could not create alternate prefix from: " + prefix);
- }
}
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -21,13 +21,14 @@
*/
package org.jboss.ejb3.stateless;
-import java.lang.reflect.InvocationTargetException;
import javax.ejb.LocalHome;
+
import org.jboss.annotation.ejb.LocalBinding;
import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.JBossProxy;
import org.jboss.ejb3.NonSerializableFactory;
import org.jboss.ejb3.ProxyFactoryHelper;
+import org.jboss.logging.Logger;
/**
@@ -38,33 +39,42 @@
*/
public class StatelessLocalProxyFactory extends BaseStatelessProxyFactory
{
+ private static final Logger log = Logger.getLogger(StatelessLocalProxyFactory.class);
+
protected Class[] getInterfaces()
{
Class[] interfaces;
-
- EJBContainer statelessContainer = (EJBContainer) container;
- LocalHome localHome = (LocalHome) statelessContainer.resolveAnnotation(LocalHome.class);
-
+
+ EJBContainer statelessContainer = (EJBContainer)container;
+ LocalHome localHome = (LocalHome)statelessContainer.resolveAnnotation(LocalHome.class);
+
boolean bindTogether = false;
-
+
if (localHome != null && bindHomeAndBusinessTogether(statelessContainer))
bindTogether = true;
-
+
Class[] localInterfaces = ProxyFactoryHelper.getLocalInterfaces(container);
-
- if (bindTogether)
- interfaces = new Class[localInterfaces.length + 3];
+
+ if (localInterfaces != null)
+ {
+ if (bindTogether)
+ interfaces = new Class[localInterfaces.length + 3];
+ else
+ interfaces = new Class[localInterfaces.length + 2];
+
+ System.arraycopy(localInterfaces, 0, interfaces, 0, localInterfaces.length);
+ interfaces[localInterfaces.length] = JBossProxy.class;
+ interfaces[localInterfaces.length + 1] = javax.ejb.EJBLocalObject.class;
+ if (bindTogether)
+ interfaces[localInterfaces.length + 2] = localHome.value();
+ }
else
- interfaces = new Class[localInterfaces.length + 2];
+ {
+ log.warn("[EJBTHREE-933] NPE when deploying web service beans");
+ interfaces = new Class[] {};
+ }
- System.arraycopy(localInterfaces, 0, interfaces, 0, localInterfaces.length);
- interfaces[localInterfaces.length] = JBossProxy.class;
- interfaces[localInterfaces.length + 1] = javax.ejb.EJBLocalObject.class;
- if (bindTogether)
- interfaces[localInterfaces.length + 2] = localHome.value();
-
return interfaces;
-
}
protected boolean bindHomeAndBusinessTogether(EJBContainer container)
Modified: branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
===================================================================
--- branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -85,7 +85,7 @@
}
else
{
- log.warn("[EJBTHREE-933] No remote interfaces available");
+ log.warn("[EJBTHREE-933] NPE when deploying web service beans");
interfaces = new Class[] {};
}
Added: branches/JBossWS_2_0_0_GA/mergeinfo.txt
===================================================================
--- branches/JBossWS_2_0_0_GA/mergeinfo.txt (rev 0)
+++ branches/JBossWS_2_0_0_GA/mergeinfo.txt 2007-07-01 21:08:34 UTC (rev 63759)
@@ -0,0 +1,17 @@
+#
+# This file records SVN merges that have already been done
+# using this branch. Plese use the following format
+#
+#
+# username, dd-mmm-yyyy
+# svn merge -r start:end svn url
+#
+# $Id: mergeinfo.txt 3616 2007-06-18 13:53:29Z darran.lofthouse at jboss.com $
+
+thomas.diesler at jboss.com 01-Jul-2007
+svn merge -r62241:62245 https://svn.jboss.org/repos/jbossas/trunk
+svn merge -r62254:62257 https://svn.jboss.org/repos/jbossas/trunk
+svn merge -r62272:62273 https://svn.jboss.org/repos/jbossas/trunk
+svn merge -r62277:62292 https://svn.jboss.org/repos/jbossas/trunk
+svn merge -r62333:62345 https://svn.jboss.org/repos/jbossas/trunk
+
Modified: branches/JBossWS_2_0_0_GA/server/src/etc/conf/default/log4j.xml
===================================================================
--- branches/JBossWS_2_0_0_GA/server/src/etc/conf/default/log4j.xml 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/server/src/etc/conf/default/log4j.xml 2007-07-01 21:08:34 UTC (rev 63759)
@@ -207,8 +207,8 @@
</category>
<!-- Enable JBossWS message tracing -->
- <category name="jbossws.SOAPMessage">
- <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ <category name="org.jboss.ws.core.MessageTrace">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
</category>
<!-- Decrease the priority threshold for the org.jboss.varia category
Modified: branches/JBossWS_2_0_0_GA/server/src/main/org/jboss/deployment/JBossEjbObjectFactory.java
===================================================================
--- branches/JBossWS_2_0_0_GA/server/src/main/org/jboss/deployment/JBossEjbObjectFactory.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/server/src/main/org/jboss/deployment/JBossEjbObjectFactory.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -23,9 +23,6 @@
// $Id: $
-
-import java.util.StringTokenizer;
-
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -53,6 +50,8 @@
import org.jboss.metadata.SecurityIdentityMetaData;
import org.jboss.metadata.SecurityRoleMetaData;
import org.jboss.metadata.SessionMetaData;
+import org.jboss.metadata.ApplicationMetaData.WebserviceDescription;
+import org.jboss.metadata.ApplicationMetaData.Webservices;
import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.ws.integration.ServiceRefMetaData;
import org.jboss.xb.binding.UnmarshallingContext;
@@ -85,21 +84,19 @@
/**
* Return the root.
*/
- public Object newRoot(Object root, UnmarshallingContext navigator,
- String namespaceURI, String localName, Attributes attrs)
+ public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
// If both the root and metaData are null the deployer is likely in the wrong order
- if( root == null && appMetaData == null )
+ if (root == null && appMetaData == null)
throw new IllegalStateException("No existing ApplicationMetaData, check the JBossEjbObjectFactory order");
return root == null ? appMetaData : root;
}
- public Object completeRoot(Object root, UnmarshallingContext ctx,
- String uri, String name)
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
{
ApplicationMetaData app = (ApplicationMetaData)root;
- if(app.getUnauthenticatedPrincipal() == null)
+ if (app.getUnauthenticatedPrincipal() == null)
{
app.setDefaultUnauthenticatedPrincipal();
}
@@ -109,38 +106,35 @@
/**
* Called when parsing of a new element started.
*/
- public Object newChild(ApplicationMetaData dd, UnmarshallingContext navigator,
- String namespaceURI, String localName, Attributes attrs)
+ public Object newChild(ApplicationMetaData dd, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
Object child = null;
- if(localName.equals("loader-repository"))
+ if (localName.equals("loader-repository"))
{
// todo load-repository (it wasn't parsed in the ApplicationMetaData neither)
}
- else if(localName.equals("invoker-proxy-bindings"))
+ else if (localName.equals("invoker-proxy-bindings"))
{
child = dd;
}
- else if(localName.equals("invoker-proxy-binding"))
+ else if (localName.equals("invoker-proxy-binding"))
{
child = new InvokerProxyBindingMetaData();
}
- else if(localName.equals("container-configurations"))
+ else if (localName.equals("container-configurations"))
{
child = dd;
}
- else if(localName.equals("container-configuration"))
+ else if (localName.equals("container-configuration"))
{
int extendsIndex = attrs.getIndex("extends");
- if(extendsIndex != -1)
+ if (extendsIndex != -1)
{
String extendName = attrs.getValue(extendsIndex);
ConfigurationMetaData extendConfig = dd.getConfigurationMetaDataByName(extendName);
- if(extendConfig == null)
+ if (extendConfig == null)
{
- throw new IllegalStateException(
- "Parent container configuration couldn't be found: " + extendName
- );
+ throw new IllegalStateException("Parent container configuration couldn't be found: " + extendName);
}
child = new ConfigurationHolder(dd, (ConfigurationMetaData)extendConfig.clone());
@@ -150,107 +144,99 @@
child = new ConfigurationHolder(dd, new ConfigurationMetaData());
}
}
- else if(localName.equals("webservices"))
+ else if (localName.equals("webservices"))
{
- child = dd;
+ child = new Webservices();
}
- else if(localName.equals("webservice-description"))
+ else if (localName.equals("enterprise-beans"))
{
- child = new WsDescription();
- }
- else if(localName.equals("enterprise-beans"))
- {
child = dd;
}
- else if (localName.equals("entity") ||
- localName.equals("session") ||
- localName.equals("message-driven") )
+ else if (localName.equals("entity") || localName.equals("session") || localName.equals("message-driven"))
{
child = new BeanHolder();
}
- else if(localName.equals("resource-managers"))
+ else if (localName.equals("resource-managers"))
{
child = dd;
}
- else if(localName.equals("resource-manager"))
+ else if (localName.equals("resource-manager"))
{
child = new ResourceManagerMetaData();
}
- else if(localName.equals("assembly-descriptor"))
+ else if (localName.equals("assembly-descriptor"))
{
child = dd.getAssemblyDescriptor();
}
return child;
}
- public Object newChild(BeanHolder bean, UnmarshallingContext navigator,
- String namespaceURI, String localName, Attributes attrs)
+ public Object newChild(BeanHolder bean, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
Object child = null;
if ((child = newEnvRefGroupChild(localName)) != null)
{
return child;
}
- else if(localName.equals("invoker-bindings"))
+ else if (localName.equals("invoker-bindings"))
{
child = bean;
}
- else if(localName.equals("invoker"))
+ else if (localName.equals("invoker"))
{
child = new InvokerMetaData(bean.metaData);
}
- else if(localName.equals("security-identity"))
+ else if (localName.equals("security-identity"))
{
child = bean.metaData.getSecurityIdentityMetaData();
- if(child == null)
+ if (child == null)
{
throw new IllegalStateException("security-identity in jboss.xml has no match in ejb-jar.xml for " + bean.metaData.getEjbName());
}
}
- else if(localName.equals("ejb-timeout-identity"))
+ else if (localName.equals("ejb-timeout-identity"))
{
child = new SecurityIdentityMetaData();
}
- else if(localName.equals("method-attributes"))
+ else if (localName.equals("method-attributes"))
{
child = bean;
}
- else if(localName.equals("method"))
+ else if (localName.equals("method"))
{
child = new MethodAttributes();
}
- else if(localName.equals("cluster-config"))
+ else if (localName.equals("cluster-config"))
{
ClusterConfigMetaData cc = new ClusterConfigMetaData();
cc.init(bean.metaData);
}
- else if(localName.equals("ior-security-config"))
+ else if (localName.equals("ior-security-config"))
{
child = new IorSecurityConfigMetaData();
}
- else if(localName.equals("cache-invalidation-config"))
+ else if (localName.equals("cache-invalidation-config"))
{
CacheInvalidationConfigMetaData config = new CacheInvalidationConfigMetaData();
config.init(bean.metaData);
child = config;
}
- else if(localName.equals("port-component"))
+ else if (localName.equals("port-component"))
{
child = new EjbPortComponentMetaData((SessionMetaData)bean.metaData);
}
- else if(localName.equals("activation-config"))
+ else if (localName.equals("activation-config"))
{
child = bean;
}
- else if(localName.equals("activation-config-property"))
+ else if (localName.equals("activation-config-property"))
{
return new ActivationConfigPropertyMetaData();
}
return child;
}
- public Object newChild(InvokerProxyBindingMetaData md, UnmarshallingContext navigator,
- String namespaceURI, String localName, Attributes attrs)
+ public Object newChild(InvokerProxyBindingMetaData md, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
Object child = null;
if (localName.equals("proxy-factory-config"))
@@ -260,21 +246,18 @@
return child;
}
- public Object newChild(ConfigurationHolder md, UnmarshallingContext navigator,
- String namespaceURI, String localName, Attributes attrs)
+ public Object newChild(ConfigurationHolder md, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
Object child = null;
if (localName.equals("cluster-config"))
{
child = new ClusterConfigMetaData();
}
- else if(localName.equals("container-interceptors") ||
- localName.equals("container-cache-conf") ||
- localName.equals("container-pool-conf"))
+ else if (localName.equals("container-interceptors") || localName.equals("container-cache-conf") || localName.equals("container-pool-conf"))
{
child = new DomElement(newDomElement(localName, attrs));
}
- else if(localName.equals("security-domain"))
+ else if (localName.equals("security-domain"))
{
//Handle the <security-domain/> usecase
child = md;
@@ -283,149 +266,148 @@
return child;
}
- public Object newChild(DomElement dom, UnmarshallingContext navigator,
- String namespaceURI, String localName, Attributes attrs)
+ public Object newChild(DomElement dom, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
Element child = dom.element.getOwnerDocument().createElement(localName);
addAttributes(child, attrs);
return new DomElement(child);
}
- public Object newChild(InvokerMetaData invoker, UnmarshallingContext navigator,
- String namespaceURI, String localName, Attributes attrs)
+ public Object newChild(InvokerMetaData invoker, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
- if(localName.equals("ejb-ref"))
+ if (localName.equals("ejb-ref"))
{
return new InvokerMetaData.EjbRef();
}
return null;
}
- public Object newChild(IorSecurityConfigMetaData invoker, UnmarshallingContext navigator,
- String namespaceURI, String localName, Attributes attrs)
+ public Object newChild(IorSecurityConfigMetaData invoker, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
- if(localName.equals("transport-config"))
+ if (localName.equals("transport-config"))
{
return new IorSecurityConfigMetaData.TransportConfig();
}
- else if(localName.equals("as-context"))
+ else if (localName.equals("as-context"))
{
return new IorSecurityConfigMetaData.AsContext();
}
- else if(localName.equals("sas-context"))
+ else if (localName.equals("sas-context"))
{
return new IorSecurityConfigMetaData.SasContext();
}
return null;
}
- public Object newChild(AssemblyDescriptorMetaData parent, UnmarshallingContext navigator,
- String namespaceURI, String localName, Attributes attrs)
+ public Object newChild(AssemblyDescriptorMetaData parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
- if(localName.equals("security-role"))
+ if (localName.equals("security-role"))
{
return new SecurityRoleMetaData();
}
- else if(localName.equals("message-destination"))
+ else if (localName.equals("message-destination"))
{
return new MessageDestinationMetaData();
}
return null;
}
- public void addChild(ApplicationMetaData parent, InvokerProxyBindingMetaData binding,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public Object newChild(Webservices parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
+ Object child = null;
+ if (localName.equals("webservice-description"))
+ {
+ child = new WebserviceDescription();
+ }
+ return child;
+ }
+
+ public void addChild(ApplicationMetaData parent, InvokerProxyBindingMetaData binding, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
parent.addInvokerProxyBinding(binding);
}
- public void addChild(ApplicationMetaData parent, ConfigurationHolder container,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(ApplicationMetaData parent, ConfigurationHolder container, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.addContainerConfiguration(container.getConfiguration());
}
- public void addChild(ApplicationMetaData parent, ResourceManagerMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(ApplicationMetaData parent, ResourceManagerMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
- if(child.jndiName != null)
+ if (child.jndiName != null)
{
parent.mapResource(child.resName, child.jndiName);
}
- else if(child.url != null)
+ else if (child.url != null)
{
parent.mapResource(child.resName, child.url);
}
else
{
- throw new IllegalStateException(child.resName +" : expected res-url or res-jndi-name tag");
+ throw new IllegalStateException(child.resName + " : expected res-url or res-jndi-name tag");
}
}
- public void addChild(ApplicationMetaData parent, WsDescription child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(ApplicationMetaData parent, Webservices child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
- parent.setConfigName(child.configName);
- parent.setConfigFile(child.configFile);
- parent.getWsdlPublishLocations().put(child.name, child.location);
+ parent.setWebservices(child);
}
- public void addChild(ConfigurationHolder parent, ClusterConfigMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(Webservices parent, WebserviceDescription child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
+ parent.getWebserviceDescriptions().add(child);
+ }
+
+ public void addChild(ConfigurationHolder parent, ClusterConfigMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
parent.getConfiguration().setClusterConfig(child);
}
- public void addChild(ConfigurationHolder parent, DomElement child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(ConfigurationHolder parent, DomElement child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
- if(localName.equals("container-interceptors"))
+ if (localName.equals("container-interceptors"))
{
parent.getConfiguration().setContainerInterceptorsConf(child.element);
}
- else if(localName.equals("container-cache-conf"))
+ else if (localName.equals("container-cache-conf"))
{
parent.getConfiguration().setContainerCacheConf(child.element);
}
- else if(localName.equals("container-pool-conf"))
+ else if (localName.equals("container-pool-conf"))
{
parent.getConfiguration().setContainerPoolConf(child.element);
}
}
- public void addChild(InvokerProxyBindingMetaData parent, DomElement domElement,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(InvokerProxyBindingMetaData parent, DomElement domElement, UnmarshallingContext navigator, String namespaceURI, String localName)
{
- if(localName.equals("proxy-factory-config"))
+ if (localName.equals("proxy-factory-config"))
{
parent.setProxyFactoryConfig(domElement.element);
}
}
- public void addChild(DomElement parent, DomElement child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(DomElement parent, DomElement child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.element.appendChild(child.element);
}
- public void addChild(BeanHolder parent, InvokerMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, InvokerMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
String jndiName = child.jndiName;
- if(jndiName == null)
+ if (jndiName == null)
{
jndiName = parent.metaData.getJndiName();
}
parent.metaData.addInvokerBinding(child.bindingName, jndiName);
}
- public void addChild(BeanHolder parent, SecurityIdentityMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, SecurityIdentityMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
- if(localName.equals("ejb-timeout-identity"))
+ if (localName.equals("ejb-timeout-identity"))
{
child.setRunAsRoleName("ejbTimeout");
- if(child.getRunAsPrincipalName() == null)
+ if (child.getRunAsPrincipalName() == null)
{
child.getUseCallerIdentity();
}
@@ -433,26 +415,22 @@
}
}
- public void addChild(BeanHolder parent, MethodAttributes child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, MethodAttributes child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.metaData.getMethodAttributes().add(child);
}
- public void addChild(BeanHolder parent, ClusterConfigMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, ClusterConfigMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.metaData.setClusterConfig(child);
}
- public void addChild(BeanHolder parent, IorSecurityConfigMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, IorSecurityConfigMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.metaData.setIorSecurityConfig(child);
}
- public void addChild(BeanHolder parent, CacheInvalidationConfigMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, CacheInvalidationConfigMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
((EntityMetaData)parent.metaData).setCacheInvalidConfig(child);
}
@@ -461,84 +439,42 @@
{
SessionMetaData sessionMetaData = (SessionMetaData)parent.metaData;
sessionMetaData.setPortComponent(pcMetaData);
-
- ApplicationMetaData appMetaData = sessionMetaData.getApplicationMetaData();
- String contextRoot = appMetaData.getWebServiceContextRoot();
-
- // Post process portComponentURI
- String portComponentURI = pcMetaData.getPortComponentURI();
- if (portComponentURI != null)
- {
- if (portComponentURI.charAt(0) != '/')
- portComponentURI = "/" + portComponentURI;
-
- if (contextRoot == null)
- {
- // The first token is the webservice context root
- StringTokenizer st = new StringTokenizer(portComponentURI, "/");
- if (st.countTokens() < 2)
- throw new IllegalStateException("Invalid <port-component-uri>, expected at least two tokens in: " + portComponentURI);
-
- contextRoot = "/" + st.nextToken();
- String prevContextRoot = contextRoot;
- if (prevContextRoot != null && prevContextRoot.equals(contextRoot) == false)
- throw new IllegalStateException("Invalid <port-component-uri>, expected to start with: " + prevContextRoot);
-
- appMetaData.setWebServiceContextRoot(contextRoot);
- portComponentURI = portComponentURI.substring(portComponentURI.indexOf('/', 1));
- }
- else if (portComponentURI.startsWith(contextRoot))
- {
- portComponentURI = portComponentURI.substring(contextRoot.length());
- }
- pcMetaData.setPortComponentURI(portComponentURI);
- }
- else
- {
- // The context root will be derived from deployment short name
- portComponentURI = "/" + sessionMetaData.getEjbName();
- pcMetaData.setPortComponentURI(portComponentURI);
- }
}
- public void addChild(BeanHolder parent, ActivationConfigPropertyMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, ActivationConfigPropertyMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
((MessageDrivenMetaData)parent.metaData).getActivationConfigProperties().put(child.getName(), child);
}
- public void addChild(BeanHolder parent, EjbLocalRefMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, EjbLocalRefMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
EjbLocalRefMetaData ref = parent.metaData.getEjbLocalRefByName(child.getName());
- if(ref == null)
+ if (ref == null)
{
- throw new IllegalStateException("ejb-local-ref " + child.getName() +
- " found in jboss.xml in ejb " + parent.metaData.getEjbName() + " could not be found in the ejb-jar.xml");
+ throw new IllegalStateException("ejb-local-ref " + child.getName() + " found in jboss.xml in ejb " + parent.metaData.getEjbName()
+ + " could not be found in the ejb-jar.xml");
}
ref.setJndiName(child.getJndiName());
}
- public void addChild(BeanHolder parent, EjbRefMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, EjbRefMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
EjbRefMetaData ref = parent.metaData.getEjbRefByName(child.getName());
- if(ref == null)
+ if (ref == null)
{
- throw new IllegalStateException("ejb-ref " + child.getName() +
- " found in jboss.xml in ejb " + parent.metaData.getEjbName() + " could not be found in the ejb-jar.xml");
+ throw new IllegalStateException("ejb-ref " + child.getName() + " found in jboss.xml in ejb " + parent.metaData.getEjbName()
+ + " could not be found in the ejb-jar.xml");
}
ref.setJndiName(child.getJndiName());
}
- public void addChild(BeanHolder parent, ResourceRefMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, ResourceRefMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
ResourceRefMetaData ref = parent.metaData.getResourceReference(child.getRefName());
- if(ref == null)
+ if (ref == null)
{
- throw new IllegalStateException("resource-ref " + child.getRefName() +
- " found in jboss.xml in ejb " + parent.metaData.getEjbName() + " could not be found in the ejb-jar.xml");
+ throw new IllegalStateException("resource-ref " + child.getRefName() + " found in jboss.xml in ejb " + parent.metaData.getEjbName()
+ + " could not be found in the ejb-jar.xml");
}
ref.setName(child.getName());
@@ -546,26 +482,24 @@
ref.setResURL(child.getResURL());
}
- public void addChild(BeanHolder parent, ResourceEnvRefMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, ResourceEnvRefMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
ResourceEnvRefMetaData ref = parent.metaData.getResourceEnvReference(child.getRefName());
- if(ref == null)
+ if (ref == null)
{
- throw new IllegalStateException("resource-env-ref " + child.getRefName() +
- " found in jboss.xml in ejb " + parent.metaData.getEjbName() + " could not be found in the ejb-jar.xml");
+ throw new IllegalStateException("resource-env-ref " + child.getRefName() + " found in jboss.xml in ejb " + parent.metaData.getEjbName()
+ + " could not be found in the ejb-jar.xml");
}
ref.setJndiName(child.getJndiName());
}
- public void addChild(BeanHolder parent, MessageDestinationRefMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(BeanHolder parent, MessageDestinationRefMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
MessageDestinationRefMetaData ref = parent.metaData.getMessageDestinationReference(child.getRefName());
- if(ref == null)
+ if (ref == null)
{
- throw new IllegalStateException("message-destination-ref " + child.getRefName() +
- " found in jboss.xml in ejb " + parent.metaData.getEjbName() + " could not be found in the ejb-jar.xml");
+ throw new IllegalStateException("message-destination-ref " + child.getRefName() + " found in jboss.xml in ejb " + parent.metaData.getEjbName()
+ + " could not be found in the ejb-jar.xml");
}
ref.setJndiName(child.getJndiName());
}
@@ -588,40 +522,38 @@
}
}
- public void addChild(InvokerMetaData parent, InvokerMetaData.EjbRef child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(InvokerMetaData parent, InvokerMetaData.EjbRef child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
EjbRefMetaData ejbRef = parent.bean.getEjbRefByName(child.ejbRefName);
- if(ejbRef == null)
+ if (ejbRef == null)
{
throw new IllegalStateException("ejb-ref " + child.ejbRefName + " found in jboss.xml but not in ejb-jar.xml");
}
ejbRef.addInvokerBinding(parent.bindingName, child.jndiName);
}
- public void addChild(IorSecurityConfigMetaData parent, IorSecurityConfigMetaData.TransportConfig child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(IorSecurityConfigMetaData parent, IorSecurityConfigMetaData.TransportConfig child, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
{
parent.setTransportConfig(child);
}
- public void addChild(IorSecurityConfigMetaData parent, IorSecurityConfigMetaData.AsContext child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(IorSecurityConfigMetaData parent, IorSecurityConfigMetaData.AsContext child, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
{
parent.setAsContext(child);
}
- public void addChild(IorSecurityConfigMetaData parent, IorSecurityConfigMetaData.SasContext child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(IorSecurityConfigMetaData parent, IorSecurityConfigMetaData.SasContext child, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
{
parent.setSasContext(child);
}
- public void addChild(AssemblyDescriptorMetaData parent, SecurityRoleMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(AssemblyDescriptorMetaData parent, SecurityRoleMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
SecurityRoleMetaData ejbjarRole = parent.getSecurityRoleByName(child.getRoleName());
- if(ejbjarRole != null)
+ if (ejbjarRole != null)
{
ejbjarRole.addPrincipalNames(child.getPrincipals());
}
@@ -631,57 +563,48 @@
}
}
- public void addChild(AssemblyDescriptorMetaData parent, MessageDestinationMetaData child,
- UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(AssemblyDescriptorMetaData parent, MessageDestinationMetaData child, UnmarshallingContext navigator, String namespaceURI, String localName)
{
MessageDestinationMetaData ejbjarDest = parent.getMessageDestinationMetaData(child.getName());
- if(ejbjarDest == null)
+ if (ejbjarDest == null)
{
throw new IllegalStateException("message-destination " + child.getName() + " found in jboss.xml but not in ejb-jar.xml");
}
ejbjarDest.setJNDIName(child.getJNDIName());
}
- public void setValue(ApplicationMetaData amd,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(ApplicationMetaData amd, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
if (localName.equals("jmx-name"))
{
amd.setJmxName(value);
}
- else if(localName.equals("enforce-ejb-restrictions"))
+ else if (localName.equals("enforce-ejb-restrictions"))
{
amd.setEnforceEjbRestrictions(Boolean.parseBoolean(value));
}
- else if(localName.equals("exception-on-rollback"))
+ else if (localName.equals("exception-on-rollback"))
{
boolean flag = Boolean.valueOf(value);
amd.setExceptionRollback(flag);
}
- else if(localName.equals("security-domain"))
+ else if (localName.equals("security-domain"))
{
amd.setSecurityDomain(value);
}
- else if(localName.equals("missing-method-permissions-excluded-mode"))
+ else if (localName.equals("missing-method-permissions-excluded-mode"))
{
amd.setExcludeMissingMethods(Boolean.parseBoolean(value));
}
- else if(localName.equals("unauthenticated-principal"))
+ else if (localName.equals("unauthenticated-principal"))
{
amd.setUnauthenticatedPrincipal(value);
}
- else if(localName.equals("context-root"))
- {
- amd.setWebServiceContextRoot(value);
- }
}
- public void setValue(InvokerProxyBindingMetaData md,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(InvokerProxyBindingMetaData md, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("name"))
+ if (localName.equals("name"))
{
md.setName(value);
}
@@ -695,151 +618,143 @@
}
}
- public void setValue(InvokerMetaData md,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(InvokerMetaData md, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("invoker-proxy-binding-name"))
+ if (localName.equals("invoker-proxy-binding-name"))
{
md.bindingName = value;
}
- else if(localName.equals("jndi-name"))
+ else if (localName.equals("jndi-name"))
{
md.jndiName = value;
}
}
- public void setValue(InvokerMetaData.EjbRef md,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(InvokerMetaData.EjbRef md, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("ejb-ref-name"))
+ if (localName.equals("ejb-ref-name"))
{
md.ejbRefName = value;
}
- else if(localName.equals("jndi-name"))
+ else if (localName.equals("jndi-name"))
{
md.jndiName = value;
}
}
- public void setValue(BeanHolder bean,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(BeanHolder bean, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
// common for entity, session and message-driven
- if( localName.equals("ejb-name") )
+ if (localName.equals("ejb-name"))
{
bean.ejbName = value;
// Lookup the metadata
bean.metaData = appMetaData.getBeanByEjbName(value);
- if(bean.metaData == null)
+ if (bean.metaData == null)
{
throw new IllegalStateException("Bean " + value + " not declared in the ejb-jar.xml");
}
}
- else if( localName.equals("jndi-name") )
+ else if (localName.equals("jndi-name"))
{
bean.metaData.setJndiName(value);
}
- else if( localName.equals("local-jndi-name") )
+ else if (localName.equals("local-jndi-name"))
{
bean.metaData.setLocalJndiName(value);
}
- else if(localName.equals("exception-on-rollback"))
+ else if (localName.equals("exception-on-rollback"))
{
bean.metaData.setExceptionRollback(Boolean.parseBoolean(value));
}
- else if(localName.equals("timer-persistence"))
+ else if (localName.equals("timer-persistence"))
{
bean.metaData.setTimerPersistence(Boolean.parseBoolean(value));
}
- else if(localName.equals("configuration-name"))
+ else if (localName.equals("configuration-name"))
{
bean.metaData.setConfigurationName(value);
}
- else if(localName.equals("security-proxy"))
+ else if (localName.equals("security-proxy"))
{
bean.metaData.setSecurityProxy(value);
}
- else if(localName.equals("depends"))
+ else if (localName.equals("depends"))
{
bean.metaData.addDepends(ObjectNameFactory.create(value));
}
// session and entity elements
- else if( localName.equals("call-by-value") )
+ else if (localName.equals("call-by-value"))
{
boolean flag = Boolean.valueOf(value);
bean.metaData.setCallByValue(flag);
}
- else if(localName.equals("clustered"))
+ else if (localName.equals("clustered"))
{
bean.metaData.setClustered(Boolean.parseBoolean(value));
}
// entity elements
- else if(localName.equals("read-only"))
+ else if (localName.equals("read-only"))
{
((EntityMetaData)bean.metaData).setReadOnly(Boolean.parseBoolean(value));
}
- else if(localName.equals("cache-invalidation"))
+ else if (localName.equals("cache-invalidation"))
{
((EntityMetaData)bean.metaData).setDoDistCachInvalidations(Boolean.parseBoolean(value));
}
// message-driven elements
- else if(localName.equals("destination-jndi-name"))
+ else if (localName.equals("destination-jndi-name"))
{
((MessageDrivenMetaData)bean.metaData).setDestinationJndiName(value);
}
- else if(localName.equals("mdb-user"))
+ else if (localName.equals("mdb-user"))
{
((MessageDrivenMetaData)bean.metaData).setUser(value);
}
- else if(localName.equals("mdb-passwd"))
+ else if (localName.equals("mdb-passwd"))
{
((MessageDrivenMetaData)bean.metaData).setPasswd(value);
}
- else if(localName.equals("mdb-client-id"))
+ else if (localName.equals("mdb-client-id"))
{
((MessageDrivenMetaData)bean.metaData).setClientId(value);
}
- else if(localName.equals("mdb-subscription-id"))
+ else if (localName.equals("mdb-subscription-id"))
{
((MessageDrivenMetaData)bean.metaData).setSubscriptionId(value);
}
- else if(localName.equals("resource-adapter-name"))
+ else if (localName.equals("resource-adapter-name"))
{
((MessageDrivenMetaData)bean.metaData).setResourceAdapterName(value);
}
}
- public void setValue(ConfigurationHolder ch,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(ConfigurationHolder ch, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
ConfigurationMetaData container = ch.getConfiguration();
if (localName.equals("container-name"))
{
// Here we may implicitly be extending an existing config
ConfigurationMetaData cmd = ch.amd.getConfigurationMetaDataByName(value);
- if( cmd != null )
+ if (cmd != null)
{
// Set the extended value to the implicit override
- container = (ConfigurationMetaData) cmd.clone();
+ container = (ConfigurationMetaData)cmd.clone();
ch.extended = container;
}
container.setName(value);
}
- else if(localName.equals("call-logging"))
+ else if (localName.equals("call-logging"))
{
container.setCallLogging(Boolean.valueOf(value));
}
- else if(localName.equals("invoker-proxy-binding-name"))
+ else if (localName.equals("invoker-proxy-binding-name"))
{
// TODO: according to the DTD there could only be one
String[] invokers = container.getInvokers();
- if(invokers == null)
+ if (invokers == null)
{
- container.setInvokerNames(new String[]{value});
+ container.setInvokerNames(new String[] { value });
}
else
{
@@ -849,190 +764,175 @@
container.setInvokerNames(newInvokers);
}
}
- else if(localName.equals("sync-on-commit-only"))
+ else if (localName.equals("sync-on-commit-only"))
{
container.setSyncOnCommitOnly(Boolean.valueOf(value));
}
- else if(localName.equals("insert-after-ejb-post-create"))
+ else if (localName.equals("insert-after-ejb-post-create"))
{
container.setInsertAfterEjbPostCreate(Boolean.valueOf(value));
}
- else if(localName.equals("call-ejb-store-on-clean"))
+ else if (localName.equals("call-ejb-store-on-clean"))
{
container.setEjbStoreForClean(Boolean.valueOf(value));
}
- else if(localName.equals("store-not-flushed"))
+ else if (localName.equals("store-not-flushed"))
{
container.setStoreNotFlushed(Boolean.valueOf(value));
}
- else if(localName.equals("instance-pool"))
+ else if (localName.equals("instance-pool"))
{
container.setInstancePool(value);
}
- else if(localName.equals("instance-cache"))
+ else if (localName.equals("instance-cache"))
{
container.setInstanceCache(value);
}
- else if(localName.equals("persistence-manager"))
+ else if (localName.equals("persistence-manager"))
{
container.setPersistenceManager(value);
}
- else if(localName.equals("web-class-loader"))
+ else if (localName.equals("web-class-loader"))
{
container.setWebClassLoader(value);
}
- else if(localName.equals("locking-policy"))
+ else if (localName.equals("locking-policy"))
{
container.setLockClass(value);
}
- else if(localName.equals("commit-option"))
+ else if (localName.equals("commit-option"))
{
container.setCommitOption(value);
}
- else if(localName.equals("optiond-refresh-rate"))
+ else if (localName.equals("optiond-refresh-rate"))
{
container.setOptionDRefreshRate(Long.parseLong(value));
}
- else if(localName.equals("security-domain"))
+ else if (localName.equals("security-domain"))
{
- container.setSecurityDomain(value);;
+ container.setSecurityDomain(value);
+ ;
}
- else if(localName.equals("depends"))
+ else if (localName.equals("depends"))
{
container.getDepends().add(ObjectNameFactory.create(value));
}
}
- public void setValue(ClusterConfigMetaData config,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(ClusterConfigMetaData config, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("partition-name"))
+ if (localName.equals("partition-name"))
{
config.setPartitionName(value);
}
- else if(localName.equals("home-load-balance-policy"))
+ else if (localName.equals("home-load-balance-policy"))
{
config.setHomeLoadBalancePolicy(value);
}
- else if(localName.equals("bean-load-balance-policy"))
+ else if (localName.equals("bean-load-balance-policy"))
{
config.setBeanLoadBalancePolicy(value);
}
- else if(localName.equals("session-state-manager-jndi-name"))
+ else if (localName.equals("session-state-manager-jndi-name"))
{
config.setHaSessionStateName(value);
}
}
- public void setValue(DomElement dom,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(DomElement dom, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
Document doc = dom.element.getOwnerDocument();
Text textNode = doc.createTextNode(value);
dom.element.appendChild(textNode);
}
- public void setValue(SecurityIdentityMetaData id,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(SecurityIdentityMetaData id, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("run-as-principal") && value != null)
+ if (localName.equals("run-as-principal") && value != null)
{
id.setRunAsPrincipalName(value);
}
}
- public void setValue(MethodAttributes method,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(MethodAttributes method, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("method-name"))
+ if (localName.equals("method-name"))
{
method.setPattern(value);
}
- else if(localName.equals("read-only"))
+ else if (localName.equals("read-only"))
{
method.setReadOnly(Boolean.parseBoolean(value));
}
- else if(localName.equals("idempotent"))
+ else if (localName.equals("idempotent"))
{
method.setIdempotent(Boolean.parseBoolean(value));
}
- else if(localName.equals("transaction-timeout"))
+ else if (localName.equals("transaction-timeout"))
{
method.setTxTimeout(Integer.parseInt(value));
}
}
- public void setValue(IorSecurityConfigMetaData.TransportConfig parent,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(IorSecurityConfigMetaData.TransportConfig parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("integrity"))
+ if (localName.equals("integrity"))
{
parent.setIntegrity(value);
}
- else if(localName.equals("confidentiality"))
+ else if (localName.equals("confidentiality"))
{
parent.setConfidentiality(value);
}
- else if(localName.equals("establish-trust-in-target"))
+ else if (localName.equals("establish-trust-in-target"))
{
parent.setEstablishTrustInTarget(value);
}
- else if(localName.equals("establish-trust-in-client"))
+ else if (localName.equals("establish-trust-in-client"))
{
parent.setEstablishTrustInClient(value);
}
- else if(localName.equals("detect-misordering"))
+ else if (localName.equals("detect-misordering"))
{
parent.setDetectMisordering(value);
}
- else if(localName.equals("detect-replay"))
+ else if (localName.equals("detect-replay"))
{
parent.setDetectReplay(value);
}
}
- public void setValue(IorSecurityConfigMetaData.AsContext parent,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(IorSecurityConfigMetaData.AsContext parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("auth-method"))
+ if (localName.equals("auth-method"))
{
parent.setAuthMethod(value);
}
- else if(localName.equals("realm"))
+ else if (localName.equals("realm"))
{
parent.setRealm(value);
}
- else if(localName.equals("required"))
+ else if (localName.equals("required"))
{
parent.setRequired(Boolean.parseBoolean(value));
}
}
- public void setValue(IorSecurityConfigMetaData.SasContext parent,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(IorSecurityConfigMetaData.SasContext parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("caller-propagation"))
+ if (localName.equals("caller-propagation"))
{
parent.setCallerPropagation(value);
}
}
- public void setValue(CacheInvalidationConfigMetaData parent,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(CacheInvalidationConfigMetaData parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("invalidation-group-name"))
+ if (localName.equals("invalidation-group-name"))
{
parent.setInvalidationGroupName(value);
}
- else if(localName.equals("invalidation-manager-name"))
+ else if (localName.equals("invalidation-manager-name"))
{
parent.setInvalidationManagerName(value);
}
@@ -1051,73 +951,73 @@
else if (localName.equals("secure-wsdl-access"))
pcMetaData.setSecureWSDLAccess(Boolean.valueOf(value));
}
-
- public void setValue(ActivationConfigPropertyMetaData parent,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+
+ public void setValue(ActivationConfigPropertyMetaData parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("activation-config-property-name"))
+ if (localName.equals("activation-config-property-name"))
{
parent.setName(value);
}
- else if(localName.equals("activation-config-property-value"))
+ else if (localName.equals("activation-config-property-value"))
{
parent.setValue(value);
}
}
- public void setValue(SecurityRoleMetaData parent,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(SecurityRoleMetaData parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("role-name"))
+ if (localName.equals("role-name"))
{
parent.setRoleName(value);
}
- else if(localName.equals("principal-name"))
+ else if (localName.equals("principal-name"))
{
parent.addPrincipalName(value);
}
}
- public void setValue(ResourceManagerMetaData parent,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(ResourceManagerMetaData parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("res-name"))
+ if (localName.equals("res-name"))
{
parent.resName = value;
}
- else if(localName.equals("res-jndi-name"))
+ else if (localName.equals("res-jndi-name"))
{
parent.jndiName = value;
}
- else if(localName.equals("res-url"))
+ else if (localName.equals("res-url"))
{
parent.url = value;
}
}
- public void setValue(WsDescription parent,
- UnmarshallingContext navigator, String namespaceURI, String localName,
- String value)
+ public void setValue(Webservices parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
- if(localName.equals("webservice-description-name"))
+ if (localName.equals("context-root"))
{
- parent.name = value;
+ parent.setContextRoot(value);
}
- else if(localName.equals("config-name"))
+ }
+
+ public void setValue(WebserviceDescription parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("webservice-description-name"))
{
- parent.configName = value;
+ parent.setDescriptionName(value);
}
- else if(localName.equals("config-file"))
+ else if (localName.equals("config-name"))
{
- parent.configFile = value;
+ parent.setConfigName(value);
}
- else if(localName.equals("wsdl-publish-location"))
+ else if (localName.equals("config-file"))
{
- parent.location = value;
+ parent.setConfigFile(value);
}
+ else if (localName.equals("wsdl-publish-location"))
+ {
+ parent.setWsdlPublishLocation(value);
+ }
}
// static
@@ -1134,14 +1034,14 @@
private static Element newDomElement(String name, Attributes attrs)
{
- if(DOC_BUILDER == null)
+ if (DOC_BUILDER == null)
{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try
{
DOC_BUILDER = factory.newDocumentBuilder();
}
- catch(ParserConfigurationException e)
+ catch (ParserConfigurationException e)
{
throw new IllegalStateException("Failed to create W3C DocumentBuilder", e);
}
@@ -1155,7 +1055,7 @@
private static void addAttributes(Element e, Attributes attrs)
{
- for(int i = 0; i < attrs.getLength(); ++i)
+ for (int i = 0; i < attrs.getLength(); ++i)
{
e.setAttribute(attrs.getQName(i), attrs.getValue(i));
}
@@ -1188,29 +1088,22 @@
String url;
}
- public static class WsDescription
- {
- String name;
- String configName;
- String configFile;
- String location;
- }
-
static class BeanHolder
{
String ejbName;
BeanMetaData metaData;
}
+
/**
* Because of how ConfigurationMetaData can both explicitly and implicitly
* extend and existing configuration, we need a holder to allow the ConfigurationMetaData
* instance to be replaced by an existing config when the container-name is seen
* as would be the case for this jboss.xml fragment:
<container-configurations>
- <container-configuration>
- <container-name>Standard Stateless SessionBean</container-name>
- <depends>test:name=Test</depends>
- </container-configuration>
+ <container-configuration>
+ <container-name>Standard Stateless SessionBean</container-name>
+ <depends>test:name=Test</depends>
+ </container-configuration>
</container-configurations>
*/
static class ConfigurationHolder
@@ -1218,11 +1111,13 @@
ApplicationMetaData amd;
ConfigurationMetaData base;
ConfigurationMetaData extended;
+
ConfigurationHolder(ApplicationMetaData amd, ConfigurationMetaData base)
{
this.amd = amd;
this.base = base;
}
+
ConfigurationMetaData getConfiguration()
{
return extended != null ? extended : base;
Modified: branches/JBossWS_2_0_0_GA/server/src/main/org/jboss/metadata/ApplicationMetaData.java
===================================================================
--- branches/JBossWS_2_0_0_GA/server/src/main/org/jboss/metadata/ApplicationMetaData.java 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/server/src/main/org/jboss/metadata/ApplicationMetaData.java 2007-07-01 21:08:34 UTC (rev 63759)
@@ -51,8 +51,7 @@
*
* @version $Revision$
*/
-public class ApplicationMetaData extends MetaData
- implements Serializable
+public class ApplicationMetaData extends MetaData implements Serializable
{
private static final long serialVersionUID = 1;
@@ -67,14 +66,8 @@
protected int ejbMinorVersion;
/** ArrayList<BeanMetaData> for the ejbs */
private ArrayList<BeanMetaData> beans = new ArrayList<BeanMetaData>();
- /** A HashMap<String, String> for webservice description publish locations */
- private HashMap wsdlPublishLocationMap = new HashMap();
/** True if this is a web service deployment */
private boolean webServiceDeployment;
- /** The optional JBossWS config-name */
- private String configName;
- /** The optional JBossWS config-file */
- private String configFile;
private String clientJar;
/** List<RelationMetaData> of relations in this application. */
private ArrayList<RelationMetaData> relationships = new ArrayList<RelationMetaData>();
@@ -93,8 +86,6 @@
private String securityDomain;
/** The unauthenticated-principal value assigned to the application */
private String unauthenticatedPrincipal;
- /** The web context root to use for web services */
- private String webServiceContextRoot;
/** An unused flag if the spec security restrictions should be enforced */
private boolean enforceEjbRestrictions;
/** The missing-method-permissions-excluded-mode value */
@@ -103,6 +94,8 @@
private boolean exceptionRollback = false;
/** The JACC context id for the container */
private String jaccContextID;
+ /** The optional <webservices> element **/
+ private Webservices webservices;
public ApplicationMetaData()
{
@@ -116,12 +109,13 @@
public Set<ObjectName> getDependencies()
{
HashSet<ObjectName> depends = new HashSet<ObjectName>();
- for(BeanMetaData bmd : beans)
+ for (BeanMetaData bmd : beans)
{
depends.addAll(bmd.getDepends());
}
return depends;
}
+
public String getDescription()
{
return description;
@@ -216,26 +210,16 @@
return null;
}
- public String getConfigFile()
+ public Webservices getWebservices()
{
- return configFile;
+ return webservices;
}
- public void setConfigFile(String configFile)
+ public void setWebservices(Webservices webservices)
{
- this.configFile = configFile;
+ this.webservices = webservices;
}
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
public String getClientJar()
{
return clientJar;
@@ -246,31 +230,6 @@
this.clientJar = clientJar;
}
- public HashMap getWsdlPublishLocations()
- {
- return wsdlPublishLocationMap;
- }
-
- public String getWsdlPublishLocationByName(String name)
- {
- // if not found, the we will use default
- return (String)wsdlPublishLocationMap.get(name);
- }
-
- public String getWebServiceContextRoot()
- {
- return webServiceContextRoot;
- }
-
- public void setWebServiceContextRoot(String webServiceContextRoot)
- {
- if (webServiceContextRoot.charAt(0) != '/')
- {
- webServiceContextRoot = "/" + webServiceContextRoot;
- }
- this.webServiceContextRoot = webServiceContextRoot;
- }
-
public boolean isWebServiceDeployment()
{
return webServiceDeployment;
@@ -892,27 +851,31 @@
}
}
- Element webservices = getOptionalChild(element, "webservices");
- if (webservices != null)
+ Element wsEl = getOptionalChild(element, "webservices");
+ if (wsEl != null)
{
- Element contextRoot = getOptionalChild(webservices, "context-root");
+ webservices = new Webservices();
+ String contextRoot = getOptionalChildContent(wsEl, "context-root");
if (contextRoot != null)
{
- webServiceContextRoot = getElementContent(contextRoot);
- if (webServiceContextRoot.charAt(0) != '/')
- webServiceContextRoot = "/" + webServiceContextRoot;
+ if (contextRoot.charAt(0) != '/')
+ contextRoot = "/" + contextRoot;
+ webservices.setContextRoot(contextRoot);
}
- iterator = getChildrenByTagName(webservices, "webservice-description");
+
+ iterator = getChildrenByTagName(wsEl, "webservice-description");
while (iterator.hasNext())
{
- Element wsd = (Element)iterator.next();
- String wsdName = getElementContent(getUniqueChild(wsd, "webservice-description-name"));
- configName = MetaData.getOptionalChildContent(wsd, "config-name");
- configFile = MetaData.getOptionalChildContent(wsd, "config-file");
- String wsdlPublishLocation = getOptionalChildContent(wsd, "wsdl-publish-location");
- wsdlPublishLocationMap.put(wsdName, wsdlPublishLocation);
+ Element wsdEl = (Element)iterator.next();
+ WebserviceDescription wsd = new WebserviceDescription();
+ wsd.setDescriptionName(getElementContent(getUniqueChild(wsdEl, "webservice-description-name")));
+ wsd.setConfigName(getOptionalChildContent(wsdEl, "config-name"));
+ wsd.setConfigFile(getOptionalChildContent(wsdEl, "config-file"));
+ wsd.setWsdlPublishLocation(getOptionalChildContent(wsdEl, "wsdl-publish-location"));
+ webservices.getWebserviceDescriptions().add(wsd);
}
}
+
// update the enterprise beans
Element entBeans = getOptionalChild(element, "enterprise-beans");
if (entBeans != null)
@@ -1085,8 +1048,73 @@
{
this.assemblyDescriptor.mergeSecurityRoles(applRoles);
}
+
+ public static class Webservices
+ {
+ private String contextRoot;
+ private List<WebserviceDescription> webserviceDescriptions = new ArrayList<WebserviceDescription>();
+
+ public String getContextRoot()
+ {
+ return contextRoot;
+ }
+
+ public void setContextRoot(String contextRoot)
+ {
+ this.contextRoot = contextRoot;
+ }
+
+ public List<WebserviceDescription> getWebserviceDescriptions()
+ {
+ return webserviceDescriptions;
+ }
+ }
+
+ public static class WebserviceDescription
+ {
+ private String descriptionName;
+ private String configName;
+ private String configFile;
+ private String wsdlPublishLocation;
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public String getDescriptionName()
+ {
+ return descriptionName;
+ }
+
+ public void setDescriptionName(String descriptionName)
+ {
+ this.descriptionName = descriptionName;
+ }
+
+ public String getWsdlPublishLocation()
+ {
+ return wsdlPublishLocation;
+ }
+
+ public void setWsdlPublishLocation(String wsdlPublishLocation)
+ {
+ this.wsdlPublishLocation = wsdlPublishLocation;
+ }
+ }
}
-
-/*
- vim:ts=3:sw=3:et
- */
Modified: branches/JBossWS_2_0_0_GA/server/src/resources/dtd/jboss_5_0.dtd
===================================================================
--- branches/JBossWS_2_0_0_GA/server/src/resources/dtd/jboss_5_0.dtd 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/server/src/resources/dtd/jboss_5_0.dtd 2007-07-01 21:08:34 UTC (rev 63759)
@@ -520,7 +520,7 @@
security-proxy? , ejb-ref* , ejb-local-ref* , service-ref*, security-identity? ,
resource-ref* , resource-env-ref*, message-destination-ref* , clustered? ,
cluster-config?, method-attributes?, depends*,
- ior-security-config?, port-component*, ejb-timeout-identity?)>
+ ior-security-config?, port-component?, ejb-timeout-identity?)>
<!-- Allow the session to have a unique id -->
<!ATTLIST session id ID #IMPLIED>
Modified: branches/JBossWS_2_0_0_GA/system/src/bin/run.sh
===================================================================
--- branches/JBossWS_2_0_0_GA/system/src/bin/run.sh 2007-07-01 19:53:08 UTC (rev 63758)
+++ branches/JBossWS_2_0_0_GA/system/src/bin/run.sh 2007-07-01 21:08:34 UTC (rev 63759)
@@ -32,6 +32,7 @@
# OS specific support (must be 'true' or 'false').
cygwin=false;
darwin=false;
+linux=false;
case "`uname`" in
CYGWIN*)
cygwin=true
@@ -40,6 +41,10 @@
Darwin*)
darwin=true
;;
+
+ Linux)
+ linux=true
+ ;;
esac
# Read an optional running configuration file
@@ -50,6 +55,11 @@
. "$RUN_CONF"
fi
+# Force IPv4 on Linux systems since IPv6 doesn't work correctly with jdk5 and lower
+if [ "$linux" = "true" ]; then
+ JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
+fi
+
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$JBOSS_HOME" ] &&
More information about the jboss-cvs-commits
mailing list