-
1. Re: Upgrading jboss-bootstrap and WS
asoldano May 18, 2009 10:41 AM (in response to alrubinger)Hi Andrew,
from component-matrix/pom.xml in Branch_5_x you get the tagged versions currently being used:<version.jboss.jbossws-common>1.1.0.GA</version.jboss.jbossws-common> <version.jboss.jbossws-framework>3.1.2.SP1</version.jboss.jbossws-framework> <version.jboss.jbossws-spi>1.1.2.GA</version.jboss.jbossws-spi> <version.jboss.jbossws>3.1.2.GA</version.jboss.jbossws>
The repository for the subprojects are:
https://svn.jboss.org/repos/jbossws/common
https://svn.jboss.org/repos/jbossws/framework
https://svn.jboss.org/repos/jbossws/spi
https://svn.jboss.org/repos/jbossws/stack/native
We did not expect to have further releases going to Branch_5_x before AS 5.1.0.GA release and the trunk of all these is meant to be for next JBossWS 3.2.0 which is going to have "major" changes. So we might want to recreate branches from the tags and release from there. Let me know which subproject you need to change and I'll do that.
Regarding the testsuite, please read here: http://jbossws.jboss.org/mediawiki/index.php?title=Running_The_Test_Suites (Maven+Ant build)
Basically, once you set up the profiles.xml and deploy your modified stack, it should be a matter of running:mvn -Ptestsuite,jboss510 test
-
2. Re: Upgrading jboss-bootstrap and WS
alrubinger May 18, 2009 10:23 PM (in response to alrubinger)OK, looks like the changes I need to make are to:
org.jboss.wsf.common.management.AbstractServerConfig
ie:public File getServerDataDir() { try { ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig"); File dir = (File)getMbeanServer().getAttribute(oname, "ServerDataDir"); return dir; } catch (JMException e) { return null; } }
...where the ObjectNames and return types need to match the new bootstrap SPI.
Would you mind creating a new branch for this project for me?
S,
ALR -
3. Re: Upgrading jboss-bootstrap and WS
alrubinger May 18, 2009 10:45 PM (in response to alrubinger)And what's up with this?
catch (JMException e) { return null; }
My patches here instead will wrap the exception in an unchecked on and propagate up the chain. This null passing leads to my undescriptive NPEs below.
S,
ALR -
4. Re: Upgrading jboss-bootstrap and WS
alrubinger May 18, 2009 10:52 PM (in response to 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 -
5. Re: Upgrading jboss-bootstrap and WS
alrubinger May 18, 2009 10:57 PM (in response to alrubinger)I'll just keep writing replies here. ;)
Another thing that occurs to me: instead of invoking over the JMX bus to get some freeform String attribute, maybe instead we should grab the jboss-bootstrap-spi-as JBossASServerConfig from the ObjectName, then perform typesafe operations upon it. Like:JBossASServerConfig config = mbeanServer.get(ObjectName); URL jbossHome = config.getJBossHome();
...but I'll leave that impl detail up to you guys.
S,
ALR -
6. Re: Upgrading jboss-bootstrap and WS
asoldano May 19, 2009 5:41 AM (in response to alrubinger)Hi Andrew,
I've created the branches:
https://svn.jboss.org/repos/jbossws/spi/branches/jbossws-spi-1.1.2
https://svn.jboss.org/repos/jbossws/common/branches/jbossws-common-1.1.0
https://svn.jboss.org/repos/jbossws/framework/branches/jbossws-framework-3.1.2
https://svn.jboss.org/repos/jbossws/stack/native/branches/jbossws-native-3.1.2
The JIRA for this is: https://jira.jboss.org/jira/browse/JBWS-2652
I'll take a look at your patch as soon as possible. -
7. Re: Upgrading jboss-bootstrap and WS
alrubinger May 19, 2009 10:54 AM (in response to 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 -
8. Re: Upgrading jboss-bootstrap and WS
alrubinger May 19, 2009 10:57 AM (in response to alrubinger)...probably because of stuff added/changed inbetween 1.0.11.CR2 and 1.1.0...
[alrubinger@localhost Branch_5_x_BootstrapLegacyRemoval]$ svn di component-matrix/pom.xml Index: component-matrix/pom.xml =================================================================== --- component-matrix/pom.xml (revision 88920) +++ component-matrix/pom.xml (working copy) @@ -33,7 +33,7 @@ <version.javax.faces>1.2_12</version.javax.faces> <version.jboss.jaxr>1.2.1.GA</version.jboss.jaxr> <version.jboss.jbossts>4.6.1.GA</version.jboss.jbossts> - <version.jboss.jbossws-common>1.0.11.CR2</version.jboss.jbossws-common> + <version.jboss.jbossws-common>1.1.0-SNAPSHOT</version.jboss.jbossws-common> <version.jboss.jbossws-framework>3.1.2.CR2</version.jboss.jbossws-framework> <version.jboss.jbossws-spi>1.1.2.CR2</version.jboss.jbossws-spi> <version.jboss.jbossws>3.1.2.CR1</version.jboss.jbossws>
S,
ALR -
9. Re: Upgrading jboss-bootstrap and WS
asoldano May 19, 2009 11:17 AM (in response to alrubinger)That class has been refactored to other ones by Richard before 1.1.0.GA release. I suspect something's wrong with the dependencies; did you try cleaning thirdparty? I'd also svn up AS Branch_5_x before using the new snapshots, which are taken from the latest release.
-
10. Re: Upgrading jboss-bootstrap and WS
alrubinger May 19, 2009 11:25 AM (in response to alrubinger)Yup, I nuked 3rdparty.
Hmm...haven't resynced my AS branch w/ Branch_5_x. Will look into that.
S,
ALR -
11. Re: Upgrading jboss-bootstrap and WS
alrubinger May 19, 2009 2:36 PM (in response to alrubinger)After resyncing my branch w/ the recent updates to Branch_5_x, I get:
[junit] Running org.jboss.test.webservice.jbws309.JBWS309TestCase [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 7.019 sec
So I committed r10067 for JBWS-2652 and have deployed a new SNAPSHOT containing my patch to:
https://snapshots.jboss.org/maven2/org/jboss/ws/jbossws-common/1.1.0-SNAPSHOT/jbossws-common-1.1.0-20090519.183219-3.jar
After confirming I've got nothing else to do (full AS TestSuite run on my Hudson), I might ask for a new release from the new branches/jbossws-common-1.1.0.
S
ALR -
12. Re: Upgrading jboss-bootstrap and WS
alrubinger May 20, 2009 1:10 AM (in response to alrubinger)Neat:
http://jboss.hudson.alrubinger.com/job/AS_TestSuite_Branch_5_x_BootstrapLegacyRemoval/6/testReport/
All the *ws failures are gone. 18 remaining, of which 9 were present before.
May we please have a jbossws-common-1.1.1-alpha-1 ?
I say 1.1.1-alpha-1 because I don't want to go to 1.1.0.CRx, only to find that we need to make more changes later and there's some officially-named release out there. So some internal release which can be promoted to GA or CR level would be nice first. But again, that kind of decision is for y'all.
S,
ALR -
13. Re: Upgrading jboss-bootstrap and WS
asoldano May 20, 2009 3:08 AM (in response to alrubinger)Hi Andrew,
we should expect failures running tests against Branch_5_x (not your branch) and the other AS tags/branches after installing the new snapshot, right? Asking as I see some failures here http://jbossws.jboss.org:8180/hudson/ ... Currently re-running to be sure of the failures, then I'll take a look more in details. Generally speaking we should come to something allowing us to run on all supported target container, but let's see the results first. -
14. Re: Upgrading jboss-bootstrap and WS
alrubinger May 20, 2009 9:47 AM (in response to alrubinger)Yep, these failures are expected:
http://jbossws.jboss.org:8180/hudson/job/AS-Tests-AS-5.1.0/4/testReport/"alessio.soldano@jboss.com" wrote:
Generally speaking we should come to something allowing us to run on all supported target container, but let's see the results first.
That would depend upon a backwards-compatible new jboss-metadata implementation, and this is not; I intentionally changed APIs to strip out stuff we don't want in there and make the method names more uniform. So until jboss-metadata is updated in Branch_5_x, those will continue to fail. But that doesn't mean we need to switch jbossws-common in AS all at once.
S,
ALR