[Design of POJO Server] - Deploying content installed after server start
by bstansberry@jboss.com
Been digging into why my old VFSDeploymentScanner-based approach to deploying deploy-hasingleton content doesn't work to see if a temporary workaround was feasible for CR1 (tnot feasible and too late anyway, but that's not the point of this post). The problem I'm seeing looks like it would be a general one for any addition to a profile that's made after ProfileServiceBootstrap.start() executes.
Basic issue is the VFSDeploymentScanner-based approach responds to becoming the singleton master by scanning deploy-hasingleton and invoking Profile.addDeployment(VFSDeployment, DeploymentPhase) for each item found. That works fine.
What breaks is the profile impl ends up storing the deployment in a Map<String,VFSDeployment>. The deployment then gets added to the runtime by an HDScanner, which looks for modified deployments. The relevant bit can be boiled down to this pseudo-code:
| Iterator<VFSDeployment> iter = apps.iterator();
| while( iter.hasNext() )
| {
| VFSDeployment ctx = iter.next();
| VirtualFile root = ctx.getRoot();
| if ( root.hasBeenModified() ) // PROBLEM!!!
| {
| ... add to a list of things to deploy
| }
| }
|
| // Assume applicationDir points to deploy-hasingleton
| VirtualFile deployDir = VFS.getRoot(applicationDir.toURI());
| List<VirtualFile> children = deployDir.getChildren();
| for(VirtualFile vf : children)
| {
| String key = vf.toURI().toString();
| if( applicationCtxs.containsKey(key) == false ) // PROBLEM!!!
| {
| ... add to a list of things to deploy
| }
| }
|
Problem is the 2 areas commented "PROBLEM!!!". In the first one, the newly added deployment doesn't get included in the modification list because the VirtualFile hasn't been modified. In the second case the newly added deployment doesn't get included in the modification list because the call to Profile.addDeployment() resulted in it getting added to the applicationCtxs map.
So, the new content doesn't ever get deployed. I would expect that with any code that calls Profile.addDeployment(), the result would be the same -- the new deployment doesn't get installed into the runtime.
For sure I see this with the basic ProfileService impl. Looking at the code I expect the same behavior with the repository-based impl, although I haven't confirmed that yet.
I'll look around some more; also see if there are unit tests that cover this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160623#4160623
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160623
15 years, 12 months
[Deployers on JBoss (Deployers/JBoss)] - Re: HOWTO deploy webapp dynamically
by adrian@jboss.org
"richard.opalka(a)jboss.com" wrote : "adrian(a)jboss.org" wrote :
| | If it is going in the wrong tomcat context then you've obviously not setup your
| | JBossWebMetaData correctly.
| We call JBossWebMetaData.setContextRoot("jaxws-endpoint") for sure :(
| "adrian(a)jboss.org" wrote :
| | And like I said before. Passing the thread context classloader is almost certainly wrong
| |
| Could you review this piece of code, please?
| jbossas/trunk/webservices/src/main/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransport.java
| and provide us constructive feedback e.g. what's fundamentally wrong there?
Starting from that class I get to:
| // Get the context root for this deployment
| String contextRoot = dep.getService().getContextRoot();
|
which is lost in some interfaces.
The only way for me to figure out what is going on is to open up a debugger
(or add logging) to verify the values are as you say in that code
and if they are, figuring out where in Tomcat (or one of the deployers
that processes JBossWebMetaData) they get changed or overridden.
This is a task that you can do just as well as I can.
I hope you can see why we don't feel overly eagre to help you
when all the work is assumed to be in one direction, especially
when known of the code (jbossws, web metadata or tomcat)
is actually an issue for the deployers framework or its forum.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160622#4160622
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160622
15 years, 12 months
[Design of JBoss jBPM] - jBPM3 status after switch to maven
by thomas.diesler@jboss.com
The build for the jBPM3 code base is now based on maven
http://jira.jboss.com/jira/browse/JBPM-1196
| svn co https://svn.jboss.org/repos/jbpm/tempranillo/jpdl/branches/jbpm3
|
| [tdiesler@tddell jbpm3]$ mvn package
| [INFO] Scanning for projects...
| [INFO] Reactor build order:
| [INFO] JBoss jBPM
| [INFO] JBoss jBPM - API
| [INFO] JBoss jBPM - jPDL
| [INFO] JBoss jBPM - jPDL Core
| [INFO] JBoss jBPM - jPDL Database
| [INFO] JBoss jBPM - jPDL Examples
| [INFO] JBoss jBPM - jPDL Identity
| [INFO] JBoss jBPM - jPDL Simulation
| [INFO] JBoss jBPM - jPDL Userguide
| [INFO] JBoss jBPM - jPDL Webservice
| [INFO] JBoss jBPM - 4JSF
| [INFO] JBoss jBPM - Console
| [INFO] JBoss jBPM - Enterprise
| [INFO] JBoss jBPM - BAM Console
| [INFO] JBoss jBPM - BAM Console Ejb
| [INFO] JBoss jBPM - BAM Console War
| [INFO] JBoss jBPM - BAM Console Ear
| [INFO] JBoss jBPM - Testsuite
| [INFO] ------------------------------------------------------------------------
| [INFO] Building JBoss jBPM
| [INFO] task-segment: [package]
| [INFO] ------------------------------------------------------------------------
|
| ...
|
| [INFO] ------------------------------------------------------------------------
| [INFO] Reactor Summary:
| [INFO] ------------------------------------------------------------------------
| [INFO] JBoss jBPM ............................................ SUCCESS [3.839s]
| [INFO] JBoss jBPM - API ...................................... SUCCESS [6.033s]
| [INFO] JBoss jBPM - jPDL ..................................... SUCCESS [0.019s]
| [INFO] JBoss jBPM - jPDL Core ................................ SUCCESS [2:00.398s]
| [INFO] JBoss jBPM - jPDL Database ............................ SUCCESS [23.799s]
| [INFO] JBoss jBPM - jPDL Examples ............................ SUCCESS [4.712s]
| [INFO] JBoss jBPM - jPDL Identity ............................ SUCCESS [24.965s]
| [INFO] JBoss jBPM - jPDL Simulation .......................... SUCCESS [5.132s]
| [INFO] JBoss jBPM - jPDL Userguide ........................... SUCCESS [0.021s]
| [INFO] JBoss jBPM - jPDL Webservice .......................... SUCCESS [2.107s]
| [INFO] JBoss jBPM - 4JSF ..................................... SUCCESS [13.298s]
| [INFO] JBoss jBPM - Console .................................. SUCCESS [1.177s]
| [INFO] JBoss jBPM - Enterprise ............................... SUCCESS [0.840s]
| [INFO] JBoss jBPM - BAM Console .............................. SUCCESS [0.009s]
| [INFO] JBoss jBPM - BAM Console Jar .......................... SUCCESS [0.528s]
| [INFO] JBoss jBPM - BAM Console War .......................... SUCCESS [2.094s]
| [INFO] JBoss jBPM - BAM Console Ear .......................... SUCCESS [3.913s]
| [INFO] JBoss jBPM - Testsuite ................................ SUCCESS [4.664s]
| [INFO] ------------------------------------------------------------------------
| [INFO] ------------------------------------------------------------------------
| [INFO] BUILD SUCCESSFUL
| [INFO] ------------------------------------------------------------------------
| [INFO] Total time: 3 minutes 40 seconds
| [INFO] Finished at: Wed Jun 25 19:25:20 CEST 2008
| [INFO] Final Memory: 46M/116M
| [INFO] ------------------------------------------------------------------------
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160619#4160619
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160619
15 years, 12 months