[Design of JBoss Web Services] - Re: Upgrading jboss-bootstrap and WS
by ALRubinger
Thanks for the branches.
But adding my patch to "branches/jbossws-common-1.1.0 " gets us compile errors in AS when we integrate back in:
[javac] Compiling 48 source files to /home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/webservices/output/classes
| /home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java:29: package org.jboss.wsf.common.javax does not exist
| import org.jboss.wsf.common.javax.JavaxAnnotationHelper;
| ^
| /home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java:30: package org.jboss.wsf.common.javax does not exist
| import org.jboss.wsf.common.javax.PreDestroyHolder;
| ^
| /home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB21.java:141: warning: [deprecation] determineJndiName() in org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData has been deprecated
| targetBean.setJndiName(jbossSessionBean.determineJndiName());
| ^
| /home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB21.java:142: warning: [deprecation] determineLocalJndiName() in org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData has been deprecated
| targetBean.setLocalJndiName(jbossBeansMetaData.determineLocalJndiName());
| ^
| /home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java:85: cannot find symbol
| symbol : variable JavaxAnnotationHelper
| location: class org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE
| JavaxAnnotationHelper.injectResources(targetBean, ep.getAttachment(InjectionsMetaData.class));
| ^
| /home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java:86: cannot find symbol
| symbol : variable JavaxAnnotationHelper
| location: class org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE
| JavaxAnnotationHelper.callPostConstructMethod(targetBean);
| ^
| /home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java:87: cannot find symbol
| symbol : class PreDestroyHolder
| location: class org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE
| ep.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean));
| ^
| /home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java:87: cannot find symbol
| symbol : class PreDestroyHolder
| location: class org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE
| ep.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean));
S,
ALR
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231939#4231939
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231939
15 years, 7 months
[Design of JBoss Web Services] - Re: Upgrading jboss-bootstrap and WS
by ALRubinger
And my (untested) patch looks like:
Index: src/main/java/org/jboss/wsf/common/management/AbstractServerConfig.java
| ===================================================================
| --- src/main/java/org/jboss/wsf/common/management/AbstractServerConfig.java (revision 10049)
| +++ src/main/java/org/jboss/wsf/common/management/AbstractServerConfig.java (working copy)
| @@ -23,6 +23,8 @@
|
| import java.io.File;
| import java.net.InetAddress;
| +import java.net.URISyntaxException;
| +import java.net.URL;
| import java.net.UnknownHostException;
| import java.util.Set;
|
| @@ -45,6 +47,12 @@
| public abstract class AbstractServerConfig implements AbstractServerConfigMBean, ServerConfig
| {
| private static final Logger log = Logger.getLogger(AbstractServerConfig.class);
| +
| + protected static final ObjectName OBJECT_NAME_SERVER_CONFIG;
| + static
| + {
| + OBJECT_NAME_SERVER_CONFIG = ObjectNameFactory.create("jboss.system:type=ServerConfig");
| + }
|
| // The MBeanServer
| private MBeanServer mbeanServer;
| @@ -110,44 +118,56 @@
|
| public File getServerTempDir()
| {
| - try
| - {
| - ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
| - File dir = (File)getMbeanServer().getAttribute(oname, "ServerTempDir");
| - return dir;
| - }
| - catch (JMException e)
| - {
| - return null;
| - }
| + return this.getDirFromServerConfig("ServerTempLocation");
| }
|
| public File getHomeDir()
| {
| + return this.getDirFromServerConfig("JBossHome");
| + }
| +
| + public File getServerDataDir()
| + {
| + return this.getDirFromServerConfig("ServerDataLocation");
| + }
| +
| + /**
| + * Obtains the specified attribute from the server configuration,
| + * represented as a {@link File}.
| + *
| + * @param attributeName
| + * @return
| + * @author ALR
| + */
| + protected File getDirFromServerConfig(final String attributeName)
| + {
| + // Define the ON to invoke upon
| + final ObjectName on = OBJECT_NAME_SERVER_CONFIG;
| +
| + // Get the URL location
| + URL location = null;
| try
| {
| - ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
| - File dir = (File)getMbeanServer().getAttribute(oname, "HomeDir");
| - return dir;
| + location = (URL) getMbeanServer().getAttribute(on, attributeName);
| }
| - catch (JMException e)
| + catch (final JMException e)
| {
| - return null;
| + throw new RuntimeException("Could not obtain attribute " + attributeName + " from " + on, e);
| }
| - }
|
| - public File getServerDataDir()
| - {
| + // Represent as a File
| + File dir = null;
| try
| {
| - ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
| - File dir = (File)getMbeanServer().getAttribute(oname, "ServerDataDir");
| - return dir;
| + dir = new File(location.toURI());
| }
| - catch (JMException e)
| + catch (final URISyntaxException urise)
| {
| - return null;
| + throw new RuntimeException("Could not desired directory from URL: " + location, urise);
| }
| +
| + // Return
| + return dir;
| }
|
| public int getWebServicePort()
S,
ALR
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231761#4231761
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231761
15 years, 7 months