[jboss-dev] [Fwd: [jboss-cvs] JBossAS SVN: r60761 - in branches/Branch_4_2/server/src/main/org/jboss: deployment and 4 other directories.]
Dimitris Andreadis
dandread at redhat.com
Wed Feb 21 09:23:49 EST 2007
With the latest WebDeployer changes the server doesn't boot properly:
Caused by: java.lang.NullPointerException
at
org.jboss.web.AbstractWebDeployer.parseWebAppDescriptors(AbstractWebDeployer.java:521)
at
org.jboss.web.AbstractWebDeployer$DescriptorParser.parseWebAppDescriptors(AbstractWebDeployer.java:867)
at
org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:158)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:372)
-------- Original Message --------
Subject: [jboss-cvs] JBossAS SVN: r60761 - in branches/Branch_4_2/server/src/main/org/jboss:
deployment and 4 other directories.
Date: Wed, 21 Feb 2007 08:01:36 -0500
From: jboss-cvs-commits at lists.jboss.org
Reply-To: jboss-cvs-commits at lists.jboss.org
To: jboss-cvs-commits at lists.jboss.org
Author: thomas.diesler at jboss.com
Date: 2007-02-21 08:01:36 -0500 (Wed, 21 Feb 2007)
New Revision: 60761
Added:
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandler.java
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandlerFactory.java
Removed:
branches/Branch_4_2/server/src/main/org/jboss/webservice/
Modified:
branches/Branch_4_2/server/src/main/org/jboss/deployment/ClientDeployer.java
branches/Branch_4_2/server/src/main/org/jboss/ejb/Container.java
branches/Branch_4_2/server/src/main/org/jboss/metadata/BeanMetaData.java
branches/Branch_4_2/server/src/main/org/jboss/metadata/ClientMetaData.java
branches/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/PortComponentRefMetaData.java
branches/Branch_4_2/server/src/main/org/jboss/web/AbstractWebDeployer.java
Log:
Cleanup service-ref handling
Modified: branches/Branch_4_2/server/src/main/org/jboss/deployment/ClientDeployer.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/deployment/ClientDeployer.java 2007-02-21
12:15:36 UTC (rev 60760)
+++ branches/Branch_4_2/server/src/main/org/jboss/deployment/ClientDeployer.java 2007-02-21
13:01:36 UTC (rev 60761)
@@ -28,8 +28,9 @@
import org.jboss.metadata.ResourceEnvRefMetaData;
import org.jboss.metadata.ResourceRefMetaData;
import org.jboss.metadata.XmlFileLoader;
+import org.jboss.metadata.serviceref.ServiceRefHandler;
+import org.jboss.metadata.serviceref.ServiceRefHandlerFactory;
import org.jboss.util.naming.Util;
-import org.jboss.webservice.WebServiceClientHandler;
import org.w3c.dom.Element;
import javax.naming.Context;
@@ -269,7 +270,8 @@
// Bind service references
Iterator serviceRefs = metaData.getServiceReferences().values().iterator();
- WebServiceClientHandler.setupServiceRefEnvironment(envCtx, serviceRefs, di);
+ ServiceRefHandler serviceRefHandler = ServiceRefHandlerFactory.newInstance();
+ serviceRefHandler.bindServiceRefs(envCtx, serviceRefs, di);
// Bind resource references
HashMap resRefs = metaData.getResourceReferences();
Modified: branches/Branch_4_2/server/src/main/org/jboss/ejb/Container.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/ejb/Container.java 2007-02-21 12:15:36 UTC
(rev 60760)
+++ branches/Branch_4_2/server/src/main/org/jboss/ejb/Container.java 2007-02-21 13:01:36 UTC
(rev 60761)
@@ -75,6 +75,8 @@
import org.jboss.metadata.MessageDestinationRefMetaData;
import org.jboss.metadata.ResourceEnvRefMetaData;
import org.jboss.metadata.ResourceRefMetaData;
+import org.jboss.metadata.serviceref.ServiceRefHandler;
+import org.jboss.metadata.serviceref.ServiceRefHandlerFactory;
import org.jboss.mx.util.ObjectNameConverter;
import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.security.AnybodyPrincipal;
@@ -86,7 +88,6 @@
import org.jboss.util.naming.ENCThreadLocalKey;
import org.jboss.util.naming.NonSerializableFactory;
import org.jboss.util.naming.Util;
-import org.jboss.webservice.WebServiceClientHandler;
import org.omg.CORBA.ORB;
/**
@@ -1235,7 +1236,8 @@
// Bind service references
Iterator serviceRefs = metaData.getServiceReferences().values().iterator();
- WebServiceClientHandler.setupServiceRefEnvironment(envCtx, serviceRefs, di);
+ ServiceRefHandler serviceRefHandler = ServiceRefHandlerFactory.newInstance();
+ serviceRefHandler.bindServiceRefs(envCtx, serviceRefs, di);
// Bind resource references
{
Modified: branches/Branch_4_2/server/src/main/org/jboss/metadata/BeanMetaData.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/metadata/BeanMetaData.java 2007-02-21
12:15:36 UTC (rev 60760)
+++ branches/Branch_4_2/server/src/main/org/jboss/metadata/BeanMetaData.java 2007-02-21
13:01:36 UTC (rev 60761)
@@ -36,7 +36,7 @@
import org.jboss.security.AnybodyPrincipal;
import org.jboss.security.NobodyPrincipal;
import org.jboss.security.SimplePrincipal;
-import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.metadata.serviceref.ServiceRefMetaData;
import org.w3c.dom.Element;
import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
Modified: branches/Branch_4_2/server/src/main/org/jboss/metadata/ClientMetaData.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/metadata/ClientMetaData.java 2007-02-21
12:15:36 UTC (rev 60760)
+++ branches/Branch_4_2/server/src/main/org/jboss/metadata/ClientMetaData.java 2007-02-21
13:01:36 UTC (rev 60761)
@@ -24,7 +24,7 @@
// $Id$
import org.jboss.deployment.DeploymentException;
-import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.metadata.serviceref.ServiceRefMetaData;
import org.w3c.dom.Element;
import java.util.ArrayList;
Modified: branches/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java 2007-02-21
12:15:36 UTC (rev 60760)
+++ branches/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java 2007-02-21
13:01:36 UTC (rev 60761)
@@ -40,7 +40,7 @@
import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.security.RunAsIdentity;
import org.jboss.security.SecurityRoleMetaData;
-import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.metadata.serviceref.ServiceRefMetaData;
import org.w3c.dom.Element;
/** A representation of the web.xml and jboss-web.xml deployment
Modified:
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/PortComponentRefMetaData.java
===================================================================
---
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/PortComponentRefMetaData.java
2007-02-21 12:15:36 UTC (rev 60760)
+++
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/PortComponentRefMetaData.java
2007-02-21 13:01:36 UTC (rev 60761)
@@ -62,6 +62,17 @@
return serviceRefMetaData;
}
+ /**
+ * The port-component-link element links a port-component-ref
+ * to a specific port-component required to be made available
+ * by a service reference.
+ *
+ * The value of a port-component-link must be the
+ * port-component-name of a port-component in the same module
+ * or another module in the same application unit. The syntax
+ * for specification follows the syntax defined for ejb-link
+ * in the EJB 2.0 specification.
+ */
public String getPortComponentLink()
{
return portComponentLink;
Added: branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandler.java
===================================================================
---
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandler.java
(rev 0)
+++
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandler.java
2007-02-21 13:01:36 UTC (rev 60761)
@@ -0,0 +1,50 @@
+/*
+ * 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.metadata.serviceref;
+
+// $Id$
+
+import java.util.Iterator;
+
+import javax.naming.Context;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+
+/**
+ * Implemtent to bind JAXRPC ServiceRefs
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2004
+ */
+public interface ServiceRefHandler
+{
+ /**
+ * Binds a JAXRPC Service into the callers ENC for every service-ref element
+ *
+ * @param envCtx ENC to bind the javax.rpc.xml.Service object to
+ * @param serviceRefs An iterator of the service-ref elements in the client deployment
descriptor
+ * @param di The client's deployment info
+ * @throws org.jboss.deployment.DeploymentException if it goes wrong
+ */
+ void bindServiceRefs(Context envCtx, Iterator serviceRefs, DeploymentInfo di) throws
DeploymentException;
+}
Property changes on:
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandlerFactory.java
===================================================================
---
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandlerFactory.java
(rev 0)
+++
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandlerFactory.java
2007-02-21 13:01:36 UTC (rev 60761)
@@ -0,0 +1,63 @@
+/*
+ * 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.metadata.serviceref;
+
+// $Id$
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxyExt;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.mx.util.ObjectNameFactory;
+
+/**
+ * JBossWS client deployment over JMX
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2004
+ */
+public class ServiceRefHandlerFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceRefHandlerFactory.class);
+
+ /** Get the ServiceRefHandler MBean proxy
+ */
+ public static ServiceRefHandler newInstance()
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ObjectName objectName = ObjectNameFactory.create("jboss.ws:service=ServiceRefHandler");
+
+ ServiceRefHandler refHandler = null;
+ if (server.isRegistered(objectName))
+ {
+ refHandler = (ServiceRefHandler)MBeanProxyExt.create(ServiceRefHandler.class,
objectName, server);
+ }
+ else
+ {
+ log.warn("Not registered: " + objectName);
+ }
+ return refHandler;
+ }
+}
Property changes on:
branches/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandlerFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/Branch_4_2/server/src/main/org/jboss/web/AbstractWebDeployer.java
===================================================================
--- branches/Branch_4_2/server/src/main/org/jboss/web/AbstractWebDeployer.java 2007-02-21
12:15:36 UTC (rev 60760)
+++ branches/Branch_4_2/server/src/main/org/jboss/web/AbstractWebDeployer.java 2007-02-21
13:01:36 UTC (rev 60761)
@@ -52,11 +52,12 @@
import org.jboss.metadata.ResourceEnvRefMetaData;
import org.jboss.metadata.ResourceRefMetaData;
import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.serviceref.ServiceRefHandler;
+import org.jboss.metadata.serviceref.ServiceRefHandlerFactory;
import org.jboss.mx.loading.LoaderRepositoryFactory;
import org.jboss.util.naming.NonSerializableFactory;
import org.jboss.util.naming.Util;
import org.jboss.web.AbstractWebContainer.WebDescriptorParser;
-import org.jboss.webservice.WebServiceClientHandler;
import org.omg.CORBA.ORB;
/** A template pattern class for web deployer integration into JBoss. This class
@@ -516,7 +517,8 @@
linkEjbLocalRefs(ejbLocalRefs, envCtx, di);
Iterator serviceRefs = metaData.getServiceReferences();
log.debug("linkServiceRefs");
- WebServiceClientHandler.setupServiceRefEnvironment(envCtx, serviceRefs, di);
+ ServiceRefHandler serviceRefHandler = ServiceRefHandlerFactory.newInstance();
+ serviceRefHandler.bindServiceRefs(envCtx, serviceRefs, di);
String securityDomain = metaData.getSecurityDomain();
log.debug("linkSecurityDomain");
linkSecurityDomain(securityDomain, envCtx);
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-cvs-commits
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dimitris Andreadis
JBoss AS, Project Lead
JBoss, a Division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
http://jboss.org/jbossBlog/blog/dimitris/
http://dandreadis.blogspot.com/
More information about the jboss-development
mailing list