You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jacek Laskowski <ja...@laskowski.net.pl> on 2009/10/12 17:34:12 UTC

Upgrading to XBean 3.7-SNAPSHOT for openejb osgi'fication

Hi,

While trying to run the latest openejb3 build on Apache Felix 2.0.0 I
run across an issue with the version numbering of XBean shaded
projects - xbean-asm-shaded and xbean-finder-shaded. See
https://issues.apache.org/jira/browse/XBEAN-141 for more info. Without
these changes and some other around MANIFEST.MF generation via
maven-bundle-plugin I was not able to start openejb. Now, the
openejb-core bundle starts fine.

Welcome to Felix
================

-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (2.0.0)
[   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.1)
[   2] [Active     ] [    1] Apache Felix Shell Service (1.4.0)
[   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.0)
[   4] [Active     ] [    1] javaee-api (5.0)
[   5] [Active     ] [    1]
file:/C:/.m2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
[   7] [Active     ] [    1] openejb-jee (3.1.2.SNAPSHOT)
[   8] [Active     ] [    1] file:/C:/.m2/wsdl4j/wsdl4j/1.6.1/wsdl4j-1.6.1.jar
[   9] [Active     ] [    1] Apache XBean :: Naming (3.6.0.SNAPSHOT)
[  14] [Active     ] [    1] Apache XBean :: ASM shaded (repackaged)
(3.7.0.SNAPSHOT)
[  15] [Active     ] [    1] Apache XBean :: Reflect (3.6.0.SNAPSHOT)
[  23] [Active     ] [    1] openejb-loader (3.1.2.SNAPSHOT)
[  25] [Active     ] [    1] OPS4J Pax Url - wrap: (0.3.2)
[  26] [Active     ] [    1] Apache Felix Configuration Admin Service (1.2.4)
[  27] [Active     ] [    1]
wrap_http___repo1.maven.org_maven2_wsdl4j_wsdl4j_1.6.2_wsdl4j-1.6.2.jar
(0)
[  29] [Active     ] [    1] openejb-core (3.1.2.SNAPSHOT)
[  30] [Active     ] [    1]
wrap_file__C__.m2_commons-cli_commons-cli_1.1_commons-cli-1.1.jar (0)
[  31] [Active     ] [    1]
wrap_file__C__.m2_org_apache_geronimo_components_geronimo-connector_2.1_geronimo-connector-2.1.jar
(0)
[  32] [Active     ] [    1]
wrap_file__C__.m2_org_apache_geronimo_components_geronimo-transaction_2.1_geronimo-transaction-2.1.jar
(0)
[  33] [Active     ] [    1]
wrap_file__C__.m2_log4j_log4j_1.2.12_log4j-1.2.12.jar (0)
[  34] [Active     ] [    1] openejb-api (3.1.2.SNAPSHOT)
[  35] [Active     ] [    1] openejb-javaagent (3.1.2.SNAPSHOT)
[  36] [Active     ] [    1] Apache XBean :: Finder shaded
(repackaged) (3.7.0.SNAPSHOT)
-> version
2.0.0

As you can see, some of the deps were wrapped via OPS4J Pax Url -
wrap: bundle as they were not OSGi bundles at all and I meant to keep
them to the minimum.

To make the story short, I need to upgrade to XBean 3.7-SNAPSHOT, but
I'm not able to deploy it due to misconfiguration of my maven env
(don't yet know what to change after the changes to maven repo setup
at ASF). Before it's sorted out, xbean will have to be built locally
to build openejb. Objection? Anybody lends me a helping hand?

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl

Re: Upgrading to XBean 3.7-SNAPSHOT for openejb osgi'fication

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Mon, Oct 12, 2009 at 7:07 PM, Jonathan Gallimore
<jo...@gmail.com> wrote:

> I'm pretty new to OSGi, but I'm keen to give it a go and help out if I can.
> I'll have a look over the JIRA issue and have a play about with Felix. If
> you're able to give me some pointers or something to specifically look at,
> that would be really helpful.

Glad it has spurred so much interest. It's been on my todo list for
almost 2-3 years and after having failed with Geronimo osgi'fication
(it seems to be way too large for such an OSGi newbie like me) I
finally come back to openejb which is way smaller and will hopefully
cause less troubles along the way.

The idea for openejb osgi'fication is to build a very small openejb
"kernel" (a mere openejb without anything :)) and everything else as
osgi services. You want stateless ejb container, install appropriate
bundle and start it. You want another openejb service, simply install
another service bundle and be done with it. That's the idea and I know
OSGI can do it, but am not sure *I* can do it. I don't really like
facing the jar hell with people have to worry about before starting
openejb. I would really like having a very small openejb with services
that can be disables/enabled in a more user-friendly way. Perhaps, I
underestimate what's already available in openejb, but since it's a
proprietary solution I don't think it gets much exposure. OSGi would
surely change it. If we could do that, we could probably "inject"
openejb into other OSGi-fied application servers without much hassle.
That's my dream of how openejb would look like in 4.0.

Without more ado, I begun playing with openejb3 and felix. Here are my
notes from today's experiments. I'll need to put it somewhere on the
website.

1/ Build the latest sources of xbean and openejb3 (mvn clean install will do)
2/ Download Apache Felix Configuration Admin Service (1.2.4) and save
it in bundle dir of the felix home dir.
3/ Start felix with conf/config.properties changed as follows:

org.osgi.framework.system.packages.extra=sun.misc

4/ Download http://wiki.ops4j.org/display/paxurl/Pax+URL (I worked
with the very old 0.3 release) and install/start it in felix
5/ Install the following jars (C:/.m2 is my local maven repo)

install file:/C:/.m2/org/apache/openejb/javaee-api/5.0-2/javaee-api-5.0-2.jar
install file:/C:/.m2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
install file:/C:/.m2/org/apache/openejb/openejb-jee/3.1.2-SNAPSHOT/openejb-jee-3.1.2-SNAPSHOT.jar
install wrap:file:/C:/.m2/wsdl4j/wsdl4j/1.6.1/wsdl4j-1.6.1.jar
install file:/C:/.m2/org/apache/xbean/xbean-naming/3.6-SNAPSHOT/xbean-naming-3.6-SNAPSHOT.jar
install file:/C:\oss\xbean\xbean-asm-shaded\target\xbean-asm-shaded-3.7-SNAPSHOT.jar
install file:/C:/.m2/org/apache/xbean/xbean-reflect/3.6-SNAPSHOT/xbean-reflect-3.6-SNAPSHOT.jar
install file:/C:\oss\xbean\xbean-finder-shaded\target\xbean-finder-shaded-3.7-SNAPSHOT.jar
install wrap:file:/C:/.m2/commons-cli/commons-cli/1.1/commons-cli-1.1.jar
install wrap:file:/C:/.m2/org/apache/geronimo/components/geronimo-connector/2.1/geronimo-connector-2.1.jar
install wrap:file:/C:/.m2/org/apache/geronimo/components/geronimo-transaction/2.1/geronimo-transaction-2.1.jar
install wrap:file:/C:/.m2/log4j/log4j/1.2.12/log4j-1.2.12.jar
install file:/C:\.m2\org\apache\openejb\openejb-api\3.1.2-SNAPSHOT\openejb-api-3.1.2-SNAPSHOT.jar
install file:/C:\.m2\org\apache\openejb\openejb-javaagent\3.1.2-SNAPSHOT\openejb-javaagent-3.1.2-SNAPSHOT.jar
install file:/C:/.m2/org/apache/openejb/openejb-core/3.1.2-SNAPSHOT/openejb-core-3.1.2-SNAPSHOT.jar

6/ Start them up (dunno if it's required and the last bundle -
openejb-core-3.1.2-SNAPSHOT.jar - is not sufficient)

All the bundles will be started fine which is the very beginning of
the openejb osgi'fication endeavour.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl

Re: Upgrading to XBean 3.7-SNAPSHOT for openejb osgi'fication

Posted by Jonathan Gallimore <jo...@gmail.com>.
Hi Jacek,

This sounds great to me. I've always played aorund with OpenEJB with OSGi
using the bundle in the Eclipse plugin, which basically wraps all the
OpenEJB jars, so I'm not particularly familiar with the method you're using.

I'm pretty new to OSGi, but I'm keen to give it a go and help out if I can.
I'll have a look over the JIRA issue and have a play about with Felix. If
you're able to give me some pointers or something to specifically look at,
that would be really helpful.

Jon

On Mon, Oct 12, 2009 at 4:34 PM, Jacek Laskowski <ja...@laskowski.net.pl>wrote:

> Hi,
>
> While trying to run the latest openejb3 build on Apache Felix 2.0.0 I
> run across an issue with the version numbering of XBean shaded
> projects - xbean-asm-shaded and xbean-finder-shaded. See
> https://issues.apache.org/jira/browse/XBEAN-141 for more info. Without
> these changes and some other around MANIFEST.MF generation via
> maven-bundle-plugin I was not able to start openejb. Now, the
> openejb-core bundle starts fine.
>
> Welcome to Felix
> ================
>
> -> ps
> START LEVEL 1
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.0)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.1)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.0)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.0)
> [   4] [Active     ] [    1] javaee-api (5.0)
> [   5] [Active     ] [    1]
>
> file:/C:/.m2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
> [   7] [Active     ] [    1] openejb-jee (3.1.2.SNAPSHOT)
> [   8] [Active     ] [    1]
> file:/C:/.m2/wsdl4j/wsdl4j/1.6.1/wsdl4j-1.6.1.jar
> [   9] [Active     ] [    1] Apache XBean :: Naming (3.6.0.SNAPSHOT)
> [  14] [Active     ] [    1] Apache XBean :: ASM shaded (repackaged)
> (3.7.0.SNAPSHOT)
> [  15] [Active     ] [    1] Apache XBean :: Reflect (3.6.0.SNAPSHOT)
> [  23] [Active     ] [    1] openejb-loader (3.1.2.SNAPSHOT)
> [  25] [Active     ] [    1] OPS4J Pax Url - wrap: (0.3.2)
> [  26] [Active     ] [    1] Apache Felix Configuration Admin Service
> (1.2.4)
> [  27] [Active     ] [    1]
> wrap_http___repo1.maven.org_maven2_wsdl4j_wsdl4j_1.6.2_wsdl4j-1.6.2.jar
> (0)
> [  29] [Active     ] [    1] openejb-core (3.1.2.SNAPSHOT)
> [  30] [Active     ] [    1]
> wrap_file__C__.m2_commons-cli_commons-cli_1.1_commons-cli-1.1.jar (0)
> [  31] [Active     ] [    1]
>
> wrap_file__C__.m2_org_apache_geronimo_components_geronimo-connector_2.1_geronimo-connector-2.1.jar
> (0)
> [  32] [Active     ] [    1]
>
> wrap_file__C__.m2_org_apache_geronimo_components_geronimo-transaction_2.1_geronimo-transaction-2.1.jar
> (0)
> [  33] [Active     ] [    1]
> wrap_file__C__.m2_log4j_log4j_1.2.12_log4j-1.2.12.jar (0)
> [  34] [Active     ] [    1] openejb-api (3.1.2.SNAPSHOT)
> [  35] [Active     ] [    1] openejb-javaagent (3.1.2.SNAPSHOT)
> [  36] [Active     ] [    1] Apache XBean :: Finder shaded
> (repackaged) (3.7.0.SNAPSHOT)
> -> version
> 2.0.0
>
> As you can see, some of the deps were wrapped via OPS4J Pax Url -
> wrap: bundle as they were not OSGi bundles at all and I meant to keep
> them to the minimum.
>
> To make the story short, I need to upgrade to XBean 3.7-SNAPSHOT, but
> I'm not able to deploy it due to misconfiguration of my maven env
> (don't yet know what to change after the changes to maven repo setup
> at ASF). Before it's sorted out, xbean will have to be built locally
> to build openejb. Objection? Anybody lends me a helping hand?
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>

Re: Upgrading to XBean 3.7-SNAPSHOT for openejb osgi'fication

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi Jacek,

I'm very interesting in running OpenEJB in Felix (and Karaf).
I've been talking with SMix/Felix/Karaf guys to help me do the trick.

Actually, i didn't achieve running OpenEJB in Felix, but i guess i'll face
the same issue.

If i have any news, will push a note here.
Please, if you go ahead can you give us some inputs?

Jean-Louis



Jacek Laskowski wrote:
> 
> Hi,
> 
> While trying to run the latest openejb3 build on Apache Felix 2.0.0 I
> run across an issue with the version numbering of XBean shaded
> projects - xbean-asm-shaded and xbean-finder-shaded. See
> https://issues.apache.org/jira/browse/XBEAN-141 for more info. Without
> these changes and some other around MANIFEST.MF generation via
> maven-bundle-plugin I was not able to start openejb. Now, the
> openejb-core bundle starts fine.
> 
> Welcome to Felix
> ================
> 
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.0)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.1)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.0)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.0)
> [   4] [Active     ] [    1] javaee-api (5.0)
> [   5] [Active     ] [    1]
> file:/C:/.m2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
> [   7] [Active     ] [    1] openejb-jee (3.1.2.SNAPSHOT)
> [   8] [Active     ] [    1]
> file:/C:/.m2/wsdl4j/wsdl4j/1.6.1/wsdl4j-1.6.1.jar
> [   9] [Active     ] [    1] Apache XBean :: Naming (3.6.0.SNAPSHOT)
> [  14] [Active     ] [    1] Apache XBean :: ASM shaded (repackaged)
> (3.7.0.SNAPSHOT)
> [  15] [Active     ] [    1] Apache XBean :: Reflect (3.6.0.SNAPSHOT)
> [  23] [Active     ] [    1] openejb-loader (3.1.2.SNAPSHOT)
> [  25] [Active     ] [    1] OPS4J Pax Url - wrap: (0.3.2)
> [  26] [Active     ] [    1] Apache Felix Configuration Admin Service
> (1.2.4)
> [  27] [Active     ] [    1]
> wrap_http___repo1.maven.org_maven2_wsdl4j_wsdl4j_1.6.2_wsdl4j-1.6.2.jar
> (0)
> [  29] [Active     ] [    1] openejb-core (3.1.2.SNAPSHOT)
> [  30] [Active     ] [    1]
> wrap_file__C__.m2_commons-cli_commons-cli_1.1_commons-cli-1.1.jar (0)
> [  31] [Active     ] [    1]
> wrap_file__C__.m2_org_apache_geronimo_components_geronimo-connector_2.1_geronimo-connector-2.1.jar
> (0)
> [  32] [Active     ] [    1]
> wrap_file__C__.m2_org_apache_geronimo_components_geronimo-transaction_2.1_geronimo-transaction-2.1.jar
> (0)
> [  33] [Active     ] [    1]
> wrap_file__C__.m2_log4j_log4j_1.2.12_log4j-1.2.12.jar (0)
> [  34] [Active     ] [    1] openejb-api (3.1.2.SNAPSHOT)
> [  35] [Active     ] [    1] openejb-javaagent (3.1.2.SNAPSHOT)
> [  36] [Active     ] [    1] Apache XBean :: Finder shaded
> (repackaged) (3.7.0.SNAPSHOT)
> -> version
> 2.0.0
> 
> As you can see, some of the deps were wrapped via OPS4J Pax Url -
> wrap: bundle as they were not OSGi bundles at all and I meant to keep
> them to the minimum.
> 
> To make the story short, I need to upgrade to XBean 3.7-SNAPSHOT, but
> I'm not able to deploy it due to misconfiguration of my maven env
> (don't yet know what to change after the changes to maven repo setup
> at ASF). Before it's sorted out, xbean will have to be built locally
> to build openejb. Objection? Anybody lends me a helping hand?
> 
> Jacek
> 
> -- 
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
> 
> 

-- 
View this message in context: http://www.nabble.com/Upgrading-to-XBean-3.7-SNAPSHOT-for-openejb-osgi%27fication-tp25857837p25859955.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.