Required changes in drools to deploy and run in Google Application Engine
Required modifications to run jBPM in GAE
- Avoid read/write local filesyste,
- Restricted operations ClassLoader.getSystemClassLoader()
- JTA deactivated
- Issue loading compiled kb
Merge remote-tracking branch 'upstream/master'
In case the application is running in GAE, (check by the system property), the dots must be changed by slash
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
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.
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.
Updated test, does not exist this constructor Person (String), only Person (String, int)
I want to remark this contribution has been done thanks to everis Spain S.L.
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.
This is great! I'll be looking at this to see how we can incorporate it.
Huh, this has been around for 11 months.. :/ Time to retest GAE + KIE for 6.0.x.
Can one of the admins verify this patch?
@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:
OK, closing this one as per previous comment.