Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Activiti
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<p><a href="http://forums.activiti.org/en/viewtopic.php?f=4&t=1433&start=0">As suggested by Tom</a>, at this page we collect ideas concerning a classloading scheme for activiti which works in as many environments as possible.</p> <h4>1) Why is classloading an issue?</h4> <p>Activiti offers the possibility to call "client code" (i.e. custom Java Classes) form BPMN Processes using different ways:</p> <ul> <li>Directly: Java Delegates, Listeners etc.</li> <li>Indirectly: using EL</li> </ul> <p>In order to achieve this, the activiti-engine must be able to load the class definitions for delegates, which means that they must either be on the same classpath as activiti or activiti needs a custom classloader to load these classes.</p> <p>This is trivial under the following circumstances:</p> <ul> <li>a standalone Java SE application (unit test, Swing client etc...)</li> <li>a single "deployment" in a managed environment (i.e. a single war, ear, OSGi Bundle, ...) such that the activiti engine is deployed alongside with the client code.</li> </ul> <p>Unfortunately, this is often not possible, as we want to be able to redeploy processes and client code at runtime in a managed environment without stopping / starting the process engine. In such a case, the engine needs to be made aware of the classloader of a deployment.</p> <h4>2) What is already in place?</h4> <p>On the ProcessEngineConfiguration, a custom ClassLoader can be set. This Classloader is used by org.activiti.engine.impl.util.ReflectUtil to load JavaDelegates. To my knowledge, the custom classloader is currently used</p> <ul> <li>by activiti-osgi (see org.activiti.osgi.blueprint.ProcessEngineFactory)</li> <li><a href="https://svn.camunda.com/fox/trunk/incubator/activiti-enterprise/activiti-enterprise-deployer/src/main/java/com/camunda/fox/activiti/enterprise/deployer/DeploymentClassLoader.java">at camunda we are building a deployment manager for activiti and JBoss AS 5/6</a></li> </ul> <h4>3) Discussion</h4> <p>I raised the issue <a href="http://forums.activiti.org/en/viewtopic.php?f=4&t=1433&start=0">here</a> whether to also set the classloader used to load delegates as a context-ClassLoader on the current thread when calling delegates.</p> <p>The problem with the context classloader is that its role in the Java Platform is somewhat vaguely specified. On many platforms (like Jboss As), the context classloader is used to load classes.</p> <p>What we should collect here is a set of situations, where, when invoking delegates, Thread.currentThread().setContextClassLoader( CLASSLOADER of the delegate ) leads to unexpected behavior.</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced