Successfully reported this slideshow.
jBPM4 container
integration: Deployer
  Heiko Braun <hbraun@redhat.com>
              09.03.2009
Overview

• Process deployment specifics
• Concepts and gotchas with deployment/
  undeployment
• Status and next steps
AS deployments

• Create a *.par archive and copy it to
  server/<config>/deploy
• Can be done while AS running or when it’...
Process deployment:
        BPM specifics
•      In BPM we expect long running processes

     •        i.e. exists across ...
Deployment
•   Two approaches: Version or
    timestamp identification

    •   Version: Explicit as part of
        the pr...
Deployment scenarios
• Patching a process (i.e. replacing a class,
  bugfix, etc):
  - same artifact with same version
• Pr...
Undeployment
•   Single approach: Does the
    deployment artifact exist?

    •   Usally undeployment happens
        whe...
Undeployment
         scenarios
• Server shutdown
  - retain process
• Artifact removed w. server running
  - delete proce...
Process lifecycle and
        classloader
•   Server boot
    - Associate classloader, flag process “ready”

•   Server shu...
Status
• Resides in ‘modules/integration’
• Implemented for AS 5
• No JNDI binding yet
• No classloader association
• Work...
Next steps

• Port to AS 4.2.x
• Implement JNDI bindings
• Relationship to ‘enterprise’ module
• Extended in container tes...
Q&A
Appendix:
 Implemention on AS 5
• Deployment example
16:22:41,522 INFO [JBPMDeployer] Deploy JBPMDeploymentMetaData {unit=...
Appendix:
    Implemention on AS 5
    • Embracing EE5:
2009-03-09 15:26:22,737 INFO [org.jbpm.integration.jboss5.JBPMServ...
Upcoming SlideShare
Loading in …5
×

Jbpm4 Deployer

1,850 views

Published on

Published in: Technology
  • Be the first to comment

Jbpm4 Deployer

  1. 1. jBPM4 container integration: Deployer Heiko Braun <hbraun@redhat.com> 09.03.2009
  2. 2. Overview • Process deployment specifics • Concepts and gotchas with deployment/ undeployment • Status and next steps
  3. 3. AS deployments • Create a *.par archive and copy it to server/<config>/deploy • Can be done while AS running or when it’s shutdown • Covered by the AS deployer API
  4. 4. Process deployment: BPM specifics • In BPM we expect long running processes • i.e. exists across AS reboots • Processes are versioned: • Deployment can lead to a new version or “replace” a prior one (aka patching) • Process model is actually a database model: • Redeployment is not idempotent [1] [1] “Acting as if used only once, even if used multiple times. “
  5. 5. Deployment • Two approaches: Version or timestamp identification • Version: Explicit as part of the process definition (*.jpdl.xml) • Timestamp: Implicit, refers to the actual deployment artifact (filesystem) • Applies to the same deployment artifact (filename) • Derived policy identifies processes that will be stored in DB
  6. 6. Deployment scenarios • Patching a process (i.e. replacing a class, bugfix, etc): - same artifact with same version • Providing a new process (i.e. different pdl): - same artifact different version, or no version at all • Otherwise: New artifact, new version
  7. 7. Undeployment • Single approach: Does the deployment artifact exist? • Usally undeployment happens when removing files from server/ <config>/deploy • Exception: On server shutdown, all deployer get undeployment callbacks • Only if the deployment artifact is deleted the process will be removed
  8. 8. Undeployment scenarios • Server shutdown - retain process • Artifact removed w. server running - delete process • Artifact removed with server stopped - Not realized by process engine ?!
  9. 9. Process lifecycle and classloader • Server boot - Associate classloader, flag process “ready” • Server shutdown - Remove classloader, flag process “shutdown” • Gotcha: Artifact removed while server is shutdown • upon boot only processes w. artifacts will be flagged “ready” • leaves non-usable (“shutdown”) processes that need to be removed manually
  10. 10. Status • Resides in ‘modules/integration’ • Implemented for AS 5 • No JNDI binding yet • No classloader association • Works as proof of concept
  11. 11. Next steps • Port to AS 4.2.x • Implement JNDI bindings • Relationship to ‘enterprise’ module • Extended in container test coverage
  12. 12. Q&A
  13. 13. Appendix: Implemention on AS 5 • Deployment example 16:22:41,522 INFO [JBPMDeployer] Deploy JBPMDeploymentMetaData {unit=vfszip:/Users/hbraun/dev/prj/jboss/tags/JBoss_5_0_0_GA/build/ output/jboss-5.0.0.GA/server/default/deploy/Simple-Alpha2.jar/Simple_noversion.jpdl.xml, jpdl=vfszip:/Users/hbraun/dev/prj/jboss/tags/ JBoss_5_0_0_GA/build/output/jboss-5.0.0.GA/server/default/deploy/Simple-Alpha2.jar/Simple_noversion.jpdl.xml, cl=BaseClassLoader@bc4d42{vfszip:/Users/hbraun/dev/prj/jboss/tags/JBoss_5_0_0_GA/build/output/jboss-5.0.0.GA/server/default/deploy/Simple- Alpha2.jar}} 16:22:41,571 INFO [VersionTimestampPolicy] Timestamp driven policy evaluation: process 'Simple_noversion', timestamp 1236612157000 16:22:41,615 INFO [JBPMDeployer] Deploy JBPMDeploymentMetaData {unit=vfszip:/Users/hbraun/dev/prj/jboss/tags/JBoss_5_0_0_GA/build/ output/jboss-5.0.0.GA/server/default/deploy/Simple-Alpha2.jar/Simple_version.jpdl.xml, jpdl=vfszip:/Users/hbraun/dev/prj/jboss/tags/ JBoss_5_0_0_GA/build/output/jboss-5.0.0.GA/server/default/deploy/Simple-Alpha2.jar/Simple_version.jpdl.xml, cl=BaseClassLoader@bc4d42{vfszip:/Users/hbraun/dev/prj/jboss/tags/JBoss_5_0_0_GA/build/output/jboss-5.0.0.GA/server/default/deploy/Simple- Alpha2.jar}} 16:22:41,641 INFO [VersionTimestampPolicy] Version driven policy evaluation: process 'Simple_withversion', version 3
  14. 14. Appendix: Implemention on AS 5 • Embracing EE5: 2009-03-09 15:26:22,737 INFO [org.jbpm.integration.jboss5.JBPMServiceImpl] (main) ProcessEngine bound to: java:/jbpm4 class myEJB { [...] try { InitialContext ctx = new InitialContext(); this.processEngine = (ProcessEngine)ctx.lookup(quot;java:/jbpm4quot;); } catch (Exception e) { throw new RuntimeException(quot;Failed to lookup process enginequot;); } }

×