Author: thomas.diesler(a)jboss.com
Date: 2007-05-21 11:15:49 -0400 (Mon, 21 May 2007)
New Revision: 3164
Added:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBean.java
Modified:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java
Log:
xfire
Modified:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java
===================================================================
---
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java 2007-05-21
14:50:29 UTC (rev 3163)
+++
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeployer.java 2007-05-21
15:15:49 UTC (rev 3164)
@@ -27,6 +27,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.stack.xfire.metadata.services.DDBean;
import org.jboss.wsf.stack.xfire.metadata.services.DDBeans;
import org.jboss.wsf.stack.xfire.metadata.services.DDService;
@@ -74,10 +75,18 @@
ddser.setServiceFactory(serviceFactory);
if (depType == DeploymentType.JAXWS_EJB3 && invokerEJB3 != null)
- ddser.setInvoker(invokerEJB3);
+ {
+ String beanName = "InvokerBeanEJB3";
+ dd.addBean(new DDBean(beanName, invokerEJB3));
+ ddser.setInvoker("#" + beanName);
+ }
if (depType == DeploymentType.JAXWS_JSE && invokerJSE != null)
- ddser.setInvoker(invokerJSE);
+ {
+ String beanName = "InvokerBeanJSE";
+ dd.addBean(new DDBean(beanName, invokerJSE));
+ ddser.setInvoker("#" + beanName);
+ }
log.info("Add " + ddser);
dd.addService(ddser);
Added:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBean.java
===================================================================
---
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBean.java
(rev 0)
+++
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBean.java 2007-05-21
15:15:49 UTC (rev 3164)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.xfire.metadata.services;
+
+//$Id$
+
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * Metadata model for services.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 21-May-2007
+ */
+public class DDBean
+{
+ // This will be the name bean. Required.
+ private String beanName;
+ // The class name of the bean. Required.
+ private String beanClass;
+
+ public DDBean(String beanName, String beanClass)
+ {
+ this.beanName = beanName;
+ this.beanClass = beanClass;
+ }
+
+ public String getBeanName()
+ {
+ return beanName;
+ }
+
+ public void setBeanName(String beanName)
+ {
+ this.beanName = beanName;
+ }
+
+ public String getBeanClass()
+ {
+ return beanClass;
+ }
+
+ public void setBeanClass(String beanClass)
+ {
+ this.beanClass = beanClass;
+ }
+
+ public void writeTo(Writer writer) throws IOException
+ {
+ writer.write("<bean");
+ writer.write(" name='" + beanName + "'");
+ writer.write(" class='" + beanClass + "'");
+ writer.write("></bean>");
+ }
+
+ public String toString()
+ {
+ StringBuilder str = new StringBuilder("Bean");
+ str.append("\n name=" + beanName);
+ str.append("\n class=" + beanClass);
+ return str.toString();
+ }
+}
\ No newline at end of file
Property changes on:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java
===================================================================
---
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java 2007-05-21
14:50:29 UTC (rev 3163)
+++
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/metadata/services/DDBeans.java 2007-05-21
15:15:49 UTC (rev 3164)
@@ -46,7 +46,11 @@
*/
public class DDBeans
{
+ // The Required services.
private List<DDService> services = new ArrayList<DDService>();
+ // Optional additional beans.
+ private List<DDBean> beans = new ArrayList<DDBean>();
+ // The derived temp file
private File tmpFile;
public List<DDService> getServices()
@@ -59,6 +63,16 @@
services.add(service);
}
+ public List<DDBean> getBeans()
+ {
+ return beans;
+ }
+
+ public void addBean(DDBean bean)
+ {
+ beans.add(bean);
+ }
+
public URL createFileURL()
{
destroyFileURL();
@@ -96,6 +110,10 @@
{
service.writeTo(writer);
}
+ for (DDBean bean : beans)
+ {
+ bean.writeTo(writer);
+ }
writer.write("</beans>");
}