jBPM compliant with Google Application Engine #168

Closed
wants to merge 3 commits into
from

Projects

None yet

5 participants

@josecarloscr

Required changes in drools to deploy and run in Google Application Engine

josecarloscr added some commits Dec 10, 2012
@josecarloscr josecarloscr Required modifications to run jBPM in GAE
- Avoid read/write local filesyste,
- Restricted operations ClassLoader.getSystemClassLoader()
- JTA deactivated
- Issue loading compiled kb
31b4b9e
@josecarloscr josecarloscr Merge remote-tracking branch 'upstream/master' 2c5f1c2
@josecarloscr josecarloscr Merge remote-tracking branch 'upstream/master' 4f12c43
@josecarloscr

In case the application is running in GAE, (check by the system property), the dots must be changed by slash

@josecarloscr

The method ClassLoader.getParent() is not allowed in GAE runtime, so is needed to use the application classLoader : JavaDialectRuntimeData.class.getClassLoader()

Not side effects / test failed detected by this change

@josecarloscr

If the transaction Manager is specified but not the persistence context, always is used the default JtaTransactionManager.

In Gae we can not use JTA, because it throws threads and this is not allowed by the GAE runtime.

This modifications allows the application to specify a transaction manager and not the persistence context manager, using a non JTA transaction manager.

@josecarloscr

Found issue when cmdScopedEntityManger has not been setted here, only when the app is running in GAE runtime. We propose to test this behavior in any web container.

@josecarloscr

Updated test, does not exist this constructor Person (String), only Person (String, int)

@josecarloscr

I want to remark this contribution has been done thanks to everis Spain S.L.

@mdproctor
Drools and jBPM member

We'd like to get AppEngine working, but this PR will need some more work first.
1) Avoid "if" statements in multiple places, instead create a helper class that uses a delegate to centralise the method calls in one place. That way there is only one "if" on setting the correct delegate. Also we believe there are other places the code is still broken for AppEngine. I'd also like to be sure of behaviour from switching use of getCanonicalName, to be sure it's correct in all our use cases - and not just a blind method change.

2) Separate the cmdScopedEntityManger, I suggest do a different PR for that. We'd like to discuss and understand this more before applying.

@mrietveld
Drools and jBPM member

This is great! I'll be looking at this to see how we can incorporate it.

@mrietveld
Drools and jBPM member

Huh, this has been around for 11 months.. :/ Time to retest GAE + KIE for 6.0.x.

@kie-ci

Can one of the admins verify this patch?

@mrietveld
Drools and jBPM member

@psiroky Please close this -- this is a good start, but there are still some TODO's in the code.

Also, when we add functionality for GAE, we should add tests, as described here:

@psiroky
Drools and jBPM member

OK, closing this one as per previous comment.

@psiroky psiroky closed this Apr 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment