dinabandhu (4) [Avatar] Offline
#1
Hello,

Firstly, thank you very much for writing a very informative book on Activiti. It has helped me a lot to understand how to work with Activiti engine.

I have been able to get the osgi integration working using Apache Karaf following instructions in your book.

However, I am kind of at a loss on how to get in working in Jboss AS 7 (7.1.1.Final). I did try googling for some instructions but couldn't find much. I am still trying to find some more information on this.

Ideally, I would like to be able to deploy activiti components as osgi bundles using standard jboss deployment mechanisms. Can you please give some pointers on how to adjust the example on book to fit Jboss as 7?

Regards,
Dinabandhu
tijs.rademakers (494) [Avatar] Offline
#2
Re: Activiti Osgi Jboss AS 7
Hi Dinabandhu,

Thanks!
In the book I also show an example with JBoss 7 as you know, but that uses the Camunda Fox community distribution. And that one doesn't use OSGi.
I would have to look into this to give you an answer. I hope I'll have some time next week.

Best regards,

Tijs
dinabandhu (4) [Avatar] Offline
#3
Re: Activiti Osgi Jboss AS 7
Hello Tijs,

Thank you for such a prompt response.

Yes, I saw the camunda fox approach (creating a jboss subsystem) and is currently trying to create something similar.

But even if I can manage to do it it will still be jboss specific and not container agnostic, hence my interest in osgi. I hope that a osgi based solution would be container agnostic.

Thanks again for your help.

Regards,
Dinabandhu
dinabandhu (4) [Avatar] Offline
#4
Re: Activiti Osgi Jboss AS 7
Hello Tijs,

Sorry to buzz you again on this.

Did you get a chance to look into this?

Regards,
Dinabandhu
tijs.rademakers (494) [Avatar] Offline
#5
Re: Activiti Osgi Jboss AS 7
Hi Dinabandhu,

Sorry not yet. Hope to be able to give it a try this week.

Best regards,

Tijs
dinabandhu (4) [Avatar] Offline
#6
Re: Activiti Osgi Jboss AS 7
Hi,

Ok. No problems.

In the meantime, I have made some (unsuccessful) attempts at making this work with jboss osgi. I am giving the details below, in case it is of any use to you.

I have deployed everything manually on Jboss (using web console) rather than using maven as you have done for karaf, because I was not sure how to proceed using maven & jboss. The steps are as follows -

1. standalone.xml - enable osgi and add the following in the osgi subsystem configuration -

<capability name="org.apache.aries:org.apache.aries.util:0.4" />
<capability name="org.apache.aries.proxy:org.apache.aries.proxy:0.4" />
<capability name="org.apache.aries.blueprint:org.apache.aries.blueprint:0.4" />

2. Download & deploy required osgi modules (activiti dependencies)
a) commons-lang-2.6.jar
b) joda-time-2.1.jar
c) mybatis-3.1.1.jar
All of these deployed cleanly and is visible as a osgi bundle in jboss web console.
3. Deploy activiti-engine-5.11.jar -
This hit a snag. Jboss kept throwing IllegalArgumentException saying "name is null".
I then browsed thru jboss code based on the stack trace I was getting and it looked that Bundle-SymbolicName may be the problem.
I opened activiti-engine-5.11.jar and the Bundle-SymbolicName is given as
org.activiti.db.mapping.entity,org.activiti.engine
Though it was not null it did look a bit odd. I checked osgi specification and it looked to me that the name does not conform to the specification (I may be wrong).
However, I edited the manifest file and changed the symbolic name to org.activiti.engine.
After this change the jar deployed and is visible as a osgi module in jboss web console.
4. Deploy activiti-osgi-5.11.jar
This deployed cleanly without any problem.
6. I built the book-osgi-engine sample using maven. Then I had to package the h2 jar inside the book-osgi-engine jar as jboss is not treating h2 jar as a osgi bundle (i don't know why. The MFs seems ok). So i did the following -
a) added h2 jar in lib folder of book-engine
b) Added Bundle-Classpath: lib/h2-1.3.170.jar,. entry in manifest.
c) Removed org.h2.dbcx from Import-Packages so that h2 is resolved locally instead of via osgi.

After this book-engine deployed cleanly and I can see it as a osgi module in jboss web console. However I did not get the "default process engine started" message in the log, so I guess the process engine has not started.

I am stuck here as of now. I will still try further. I will appreciate any pointers from you very much.

Regards,
Dinabandhu