[JBoss AS7 Development] - SAR cannot specify multiple module dependecies
by Matt Drees
Matt Drees [http://community.jboss.org/people/matt.drees] created the discussion
"SAR cannot specify multiple module dependecies"
To view the discussion, visit: http://community.jboss.org/message/606782#606782
--------------------------------------------------------------
I have a SAR I am trying to deploy. I want it to depend on both the "org.apache.log4j" module and the "org.jboss.common-core" module (I'd like it to log a message on startup, and also bind itself into JNDI with NonSerializableObjectFactory.
As indicated on https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7 https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7, the right way to do this is with a Manifest entry in my SAR that looks like:
Dependencies: org.apache.log4j org.jboss.common-core
However, when I do this, I get a CNFE for org.jboss.util.naming.NonSerializableFactory:
10:40:41,727 WARN [org.ccci.ha.HighAvailabilityDataSource] (MSC service thread 1-2) Starting up HighAvailabilityDataSource ccpDatasource in PRIMARY mode
10:40:41,728 INFO [stdout] (MSC service thread 1-2) fullName=jdbc/ccpDatasource
10:40:41,729 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.mbean.service."jboss.jca:name=jdbc/ccpDatasource,service=DataSourceBinding".start: org.jboss.msc.service.StartException in service jboss.mbean.service."jboss.jca:name=jdbc/ccpDatasource,service=DataSourceBinding".start: Failed to execute legacy service start() method
at org.jboss.as.service.StartStopService.start(StartStopService.java:51)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_24]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
at org.jboss.as.service.AbstractService.invokeLifecycleMethod(AbstractService.java:59)
at org.jboss.as.service.StartStopService.start(StartStopService.java:49)
... 4 more
Caused by: java.lang.NoClassDefFoundError: org/jboss/util/naming/NonSerializableFactory
at org.ccci.ha.HighAvailabilityDataSource.rebind(HighAvailabilityDataSource.java:53)
at org.ccci.ha.HighAvailabilityDataSource.start(HighAvailabilityDataSource.java:34)
... 10 more
Caused by: java.lang.ClassNotFoundException: org.jboss.util.naming.NonSerializableFactory from [Module "deployment.jboss-addons-3.0-SNAPSHOT.sar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.CR2]
... 12 more
Note, however, that the logging is working correctly, so Log4j is being resolved.
So, on a whim, I switched up my Dependencies entry in the Manifest:
Dependencies: org.jboss.common-core org.apache.log4j
This, however, gives me a CNFE for org.apache.log4j.Logger:
10:39:43,720 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "jboss-addons-3.0-SNAPSHOT.sar"
10:39:43,744 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."jboss-addons-3.0-SNAPSHOT.sar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."jboss-addons-3.0-SNAPSHOT.sar".INSTALL: Failed to process phase INSTALL of deployment "jboss-addons-3.0-SNAPSHOT.sar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/log4j/Logger;
at java.lang.Class.getDeclaredFields0(Native Method) [:1.6.0_24]
at java.lang.Class.privateGetDeclaredFields(Class.java:2291) [:1.6.0_24]
at java.lang.Class.getDeclaredFields(Class.java:1743) [:1.6.0_24]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:65)
at org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedServiceDeploymentProcessor.java:112)
at org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedServiceDeploymentProcessor.java:102)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 4 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger from [Module "deployment.jboss-addons-3.0-SNAPSHOT.sar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.CR2]
... 12 more
I later commented out the logging, and verified that NonSerializableFactory is in fact being loaded. (It fails for another reason, but I'll get to that in another post.)
So, it appears that only the first entry in the Dependencies: manifest entry gets resolved by Jboss Modules. This looks like a bug, right? I don't think I'm just screwing up the manifest syntax or something.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/606782#606782]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 7 months
[JBoss AS7 Development] - XA Datasource -- apparently can't find driver
by Matt Drees
Matt Drees [http://community.jboss.org/people/matt.drees] created the discussion
"XA Datasource -- apparently can't find driver"
To view the discussion, visit: http://community.jboss.org/message/606577#606577
--------------------------------------------------------------
Hi all,
I'm trying to evaluate if my project (currently targeting AS6) can be switched over to AS7. So I'll probably be posting more of these questions as I try to adapt the project.
I'm trying to set up an XA Oracle datasource. I've set up a "com.oracle.ojdbc" module containing the oracle driver, and am trying to use it in my DS config. The log output (below) makes me think the driver is being discovered and registered correctly. However, the log output also seems to indicate that the datasource can't find the driver.
Relevant standalone.xml snippet:
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<xa-datasource jndi-name="java:jdbc/primaryCcpDatasource" pool-name="primaryCcpDatasourcePool" enabled="true" use-java-context="true">
<xa-datasource-property name="URL">
jdbc:oracle:thin:@ (DESCRIPTION = ...boring... )
</xa-datasource-property>
<xa-datasource-property name="User">
ccp
</xa-datasource-property>
<xa-datasource-property name="Password">
password
</xa-datasource-property>
<xa-datasource-class>
oracle.jdbc.xa.client.OracleXADataSource
</xa-datasource-class>
<driver>
oracle.jdbc.OracleDriver#11.2
</driver>
<xa-pool>
<min-pool-size>
1
</min-pool-size>
<max-pool-size>
5
</max-pool-size>
<prefill>
true
</prefill>
<use-strict-min>
false
</use-strict-min>
<is-same-rm-override>
false
</is-same-rm-override>
<no-tx-separate-pools/>
<pad-xid>
false
</pad-xid>
<wrap-xa-resource>
false
</wrap-xa-resource>
</xa-pool>
<validation>
<validate-on-match>
false
</validate-on-match>
<background-validation>
true
</background-validation>
<useFastFail>
false
</useFastFail>
</validation>
</xa-datasource>
<drivers>
<driver name="oracle" module="com.oracle.ojdbc6">
<xa-datasource-class>
oracle.jdbc.xa.client.OracleXADataSource
</xa-datasource-class>
</driver>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>
org.h2.jdbcx.JdbcDataSource
</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
My oracle jdbc driver module looks like this:
matt-dreess-macbook-pro:jboss-7.0.0.Beta4-SNAPSHOT mattdrees$ find modules/com/oracle/ojdbc6
modules/com/oracle/ojdbc6
modules/com/oracle/ojdbc6/main
modules/com/oracle/ojdbc6/main/module.xml
modules/com/oracle/ojdbc6/main/ojdbc6_g-11.2.0.1.0.jar
modules/com/oracle/ojdbc6/main/ojdbc6_g-11.2.0.1.0.jar.index
matt-dreess-macbook-pro:jboss-7.0.0.Beta4-SNAPSHOT mattdrees$
matt-dreess-macbook-pro:jboss-7.0.0.Beta4-SNAPSHOT mattdrees$ cat modules/com/oracle/ojdbc6/main/module.xml
<module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc6">
<resources>
<resource-root path="ojdbc6_g-11.2.0.1.0.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
Log output:
matt-dreess-macbook-pro:jboss-7.0.0.Beta4-SNAPSHOT mattdrees$ bin/standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /Users/mattdrees/Scratch/jboss-7.0.0.Beta4-SNAPSHOT
JAVA: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
=========================================================================
11:32:25,483 INFO [org.jboss.modules] JBoss Modules version 1.0.0.CR2
11:32:25,885 INFO [org.jboss.msc] JBoss MSC version 1.0.0.Beta8
11:32:25,951 INFO [org.jboss.as] JBoss AS 7.0.0.Beta4-SNAPSHOT "(TBD)" starting
11:32:27,078 INFO [org.jboss.as.server] Activating core services
11:32:27,283 INFO [org.jboss.as] creating native management service using network interface (default) port (9999)
11:32:27,291 INFO [org.jboss.as] creating http management service using network interface (default) port (9990) securePort (-1)
11:32:27,314 INFO [org.jboss.as.arquillian] Activating Arquillian Subsystem
11:32:27,335 INFO [org.jboss.as.ee] Activating EE subsystem
11:32:27,438 INFO [org.jboss.as.naming] Activating Naming Subsystem
11:32:27,457 INFO [org.jboss.as.clustering.infinispan.subsystem] Activating Infinispan subsystem.
11:32:27,536 INFO [org.jboss.as.security] Activating Security Subsystem
11:32:28,065 INFO [org.jboss.as.connector.subsystems.datasources] Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
11:32:28,077 INFO [org.jboss.as.connector.subsystems.datasources] Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)
11:32:28,080 INFO [org.jboss.as.osgi] Activating OSGi Subsystem
11:32:28,599 INFO [org.jboss.as.webservices] Activating WebServices Extension
11:32:28,857 INFO [org.jboss.as.naming] Starting Naming Service
11:32:28,861 INFO [org.jboss.as.logging] Removing bootstrap log handlers
11:32:28,963 INFO [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-4) Starting remote JMX connector
11:32:28,986 INFO [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 3.1.0.Beta2
11:32:29,038 WARN [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC service thread 1-3) Unable to set the URLStreamHandlerFactory
11:32:29,040 WARN [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC service thread 1-3) Unable to set the ContentHandlerFactory
11:32:29,072 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
11:32:29,248 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) live server is starting..
11:32:29,436 INFO [org.jboss.as.connector] (MSC service thread 1-3) Starting JCA Subsystem (JBoss IronJacamar 1.0.0.Beta6)
11:32:29,583 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-1) Started Netty Acceptor version 3.2.1.Final-r2319 localhost:5455 for CORE protocol
11:32:29,589 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-1) Started Netty Acceptor version 3.2.1.Final-r2319 localhost:5445 for CORE protocol
11:32:29,591 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) HornetQ Server version 2.1.2.Final (Colmeia, 120) started
11:32:29,726 INFO [org.jboss.as.server] (MSC service thread 1-3) Service status report
New missing/unsatisfied dependencies:
service jboss.jdbc-driver."oracle.jdbc.OracleDriver#11.2" (missing) required by [service jboss.data-source.java:/java:jdbc/primaryCcpDatasource]
11:32:29,726 ERROR [org.jboss.as] (MSC service thread 1-3) JBoss AS 7.0.0.Beta4-SNAPSHOT "(TBD)" started (with errors) in 4758ms - Started 106 of 163 services (3 services failed or missing dependencies, 54 services are passive or on-demand)
Does my configuration look correct?
Thanks for your time!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/606577#606577]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 7 months
[JBoss AS7 Development] - Profiling AS 7 using OProfile on Fedora
by Trustin Lee
Trustin Lee [http://community.jboss.org/people/trustin] modified the document:
"Profiling AS 7 using OProfile on Fedora"
To view the document, visit: http://community.jboss.org/docs/DOC-16814
--------------------------------------------------------------
Several times over the last year I have experimented with various tools for profiling AS. One of the frustrating things with that, is that the overhead of all the traditional Java profiling solutions is so high, that its hard to get meaningful results. With that in mind, I started to turn my attention to system profiling solutions, of which there are two for Linux. One is called perf, and the other oprofile.
*Perf*, is easier to use, but it currently does not have the ability to give Java method level detailed information. It also has some very interesting capabilities around locks that I would like to exploit, but without the Java method level information its a non-starter. I will definitely keep an eye on perf, because if it can add the method level information, then it may end up being the more useful too. *OProfile*, on the other hand, does have the capability to show method level information. The other item of note, is that both of these tools measure CPU utililzation, and can only give the method level information for methods that have been compiled to native code via the JIT (Just-in-Time compiler). So, methods that are run interpreted will not show up in the details, and just be lumped together with all other intrepreted methods. So, let's take a look at how to setup OProfile, and use it to profile a running JBoss Application Server.
First, we need to install OProfile. To do this, you can use yum, and the command is as follows:
yum install oprofile oprofile-jit
The second package (oprofile-jit) is necessary to get the Java method level symbol information. Next, depending on the JVM that you are using you may have to install the debug information package for the JVM. I always use OpenJDK, so I have it installed along with its debug information package. The Sun JDK has symbol information in it, so it does not need a separate installation.
To install the debug information package for OpenJDK, you first have to enable the debug information repository. List the available repositories:
$ ls /etc/yum.repos.d
dropbox.repo rpmfusion-free.repo
fedora-rawhide.repo rpmfusion-free-updates.repo
fedora.repo rpmfusion-free-updates-testing.repo
fedora-updates.repo rpmfusion-nonfree-rawhide.repo
fedora-updates-testing.repo rpmfusion-nonfree.repo
google-chrome.repo rpmfusion-nonfree-updates.repo
rpmfusion-free-rawhide.repo rpmfusion-nonfree-updates-testing.repo
If you look into the content of a .repo file, it will look like the following:
$ cat /etc/yum.repos.d/fedora.repo
...
[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$...
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
...
To enable the debuginfo repository, you must replace '*enabled=0*' with '*enabled=1*' for every repository you enabled. For example, I am using dropbox, fedora, fedora-updates, google-chrome, rpmfusion-free, rpmfusion-free-updates, rpmfusion-nonfree, rpmfusion-nonfree-updates, so I updated them all. If the .repo file does not have a section for a debuginfo repository, you might have to add it by yourself to enable it.
Now, as it turns out, just adding the repository is not enough. If you want to keep the debug information packages in sync with their respective non-debug packages you also need to install a yum plugin that will search the debug information reposiitory for corresponding updates. Otherwise, you will get them out of sync. You can install that plugin via the following command:
yum install yum-plugin-auto-update-debug-info
Now that yum is setup properly, you can install the OpenJDK debug information package via the following command:
yum install java-1.6.0-openjdk-debuginfo
Now you have both OProfile and the necessary symbol information for the JDK installed, and we can move on to profiling a running AS instance.
So, to setup an AS 7 server to be profiled we first have to start the JVM up with the oprofile agent. This is done very simply by adding the following to the JVM command line:
# 64-bit JVM
-agentpath:/usr/lib64/oprofile/libjvmti_oprofile.so
# 32-bit JVM
-agentpath:/usr/lib/oprofile/libjvmti_oprofile.so
This can be found in the standalone.conf or domain.conf in the bin directory for AS 7. The following is an example of what it looks like:
#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms10240m -Xmx10240m -XX:+UseLargePages -XX:+UseParallelOldGC"
JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true"
JAVA_OPTS="$JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
JAVA_OPTS="$JAVA_OPTS -agentpath:/usr/lib64/oprofile/libjvmti_oprofile.so"
fi
That's all there is to the setup for the AS, but this by itself does not enable profiling. There is a separate daemon process that controls the profiling that has to be started up, and controlled to turn profiling on and off. To start the daemon, and control when to start and stop profiling, there is a control program called opcontrol. The following commands will get things rolling for you. By the way, you can start up the application server at any time, after getting the agent configured on the JVM command line. Just don't start your workload that you want to profile until you are ready with the below opcontrol commands.
opcontrol --start-daemon <-- Start the deamon, but does not start profiling.
opcontrol --start <-- Starts profiling - you want to issue this command after you have started your workload running, or potentially just before.
opcontrol --dump <-- dumps the profiling data out to the default file (this can be done at any time during the workload, or right after the workload completes).
opcontrol --stop <-- Stops profiling, but leaves the daemon running.
opcontrol --shutdown <-- Shuts the daemon down, and it will no longer be running.
Once you have captured profiling data, and have dumped it, you can generate a report. The simpliest report, is done with the following:
opreport -l --output-file=<filename>
This will give you a list, starting with the highest percentage use of CPU cycles to the lowest. Keep in mind that this is a system wide profiler, so it will show everything that was running on the server, not just the java process. There are many other reporting options that can be played with, and for reference, see the http://oprofile.sourceforge.net/doc/index.html OProfile documentation:
So, if you are interested in helping out with performance tuning AS 7, this is a good place to start.
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16814]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
13 years, 7 months
[JBoss AS7 Development] - AS7 Patching requirements
by Emanuel Muckenhuber
Emanuel Muckenhuber [http://community.jboss.org/people/emuckenhuber] modified the document:
"AS7 Patching requirements"
To view the document, visit: http://community.jboss.org/docs/DOC-16822
--------------------------------------------------------------
h2. Patches and AS 7
h5. Background / Introduction to AS 7
* AS 7 offers 2 startup modes, standalone and domain.
* Standalone is just the App Server instance.
* Domain starts a Process Controller, a Host Controller, and App Server instances.
* The Process Controller is very lightweight and should remain up for long periods of time.
The Process Controller can re-start Host Controllers and App Server instances, it should be so simple that it doesn't ever need to be restarted itself.
* The Host Controller dictates whether this node is a domain 'Master' or 'Slave'.
* There may be many App Servers.
h5.
Configuration files
* Domain.xml - should be identical on all machines across the domain, but is read only by the single node acting as 'Domain Controller'.
* Host.xml - Unique for each host, this file tells this host if it's the Domain Controller or not.
h5.
Startup (Domain mode)
* domain.sh starts the Process Controller.
* Process Controller launches Host Controller. (Might be Domain Controller, might not be).
* Host Controller, with Domain Controller, manage App Server lifecycles.
* The subdirectory /data/content is a working copy of deployed stuff.
* Note: Domain mode does not currently support exploded directories for deployments.
h5. Application Server
* To the app server, all the components are 'services'.
* A Service has two statuses, 'up' and 'down'.
* There is a subsystem API if you want to extend the capabilities of the application server.
* The Getting Started Guide describes several examples included in the source version of AS 7. These examples show how the App Server's management API can be used to deploy components. *When a component is deployed, it causes the current Application Server configuration file (i.e. standalone.xml) to be re-written on the fly.*
* The App Server is made up of a core and extensions. The core contains parts like MSC (the service container), module class loading, and core management. The rest are extensions.
h5. Patching
We seek to make patching:
* Easy to produce
* Easy to audit
* Easy to test
* Easy to deploy
* Easy to roll back (perhaps. Under discussion)
* We'd like to establish a patch directory, maybe under 'modules'. This patch directory would have a sub-directory for each CP or patch that is applied.
* For this to work, we must produce a Patch-tool that will alter the path used to invoke modules. It must update the path used find classes and put the latest patch's .jars ahead of what was there previously. (The prior .jars may need to be removed, per security requirements. This is under discussion.)
* Patching a domain is more challenging than patching a single App Server instance, as it might involve patching several hosts and app server instances. A few interesting notes: * Only a domain controller can 'push' changes out.
* The domain controller's modules must be at least as current as the latest version on subordinate nodes.
The Patch-tool must use the Application Server's management API to deploy patches. We need to provide some scripting mechanism which will cause it to distribute the artifacts (perhaps to the above described directory structure for patches) and to cause updates to configuration files.
h5. A possible patch-application scenario
1) The Patch-tool talks to the Master Domain Controller, asking it for a list of subordinate hosts.
2) The Patch-tool updates the modules on the MDC with the new artifacts. This is because the MDC must be at least as current as the newest host. The MDC is restarted. Repeat Loop for each Host:
3) Patch-tool prompts the Host to reconnect to the MDC, because it has been bounced.
4) Patch-tool puts the new modules in place on the Host, restarts the Host.
5) The Patch-tool translates the configuration DSL into changes:
- Domain level changes
- Host level changes (1 per Host, so the Patch-tool can command Hosts to update, as was done in the loop above)
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16822]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
13 years, 7 months