openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis MONTEIRO <jean-louis.monte...@atosorigin.com>
Subject Re: For adventurous: first run of OSGified OpenEJB *seems* running fine
Date Wed, 28 Oct 2009 16:38:39 GMT

Hi Jacek,

I finally got time to play with.

First of all, i went to Felix-Karaf 1.0.0 which is a bit for user friendly
:)
That said, here is what i did.

1. For some strange reasons, installing osgi bundles using Pax mvn url
handler didn't run fine (not able to find my proxy settings).
So i had to change the org.ops4j.pax.url.cfg in order to hard coded where is
my settings.xml.
  org.ops4j.pax.url.mvn.settings=file:///c:/Documents and
Settings/XXX/.m2/settings.xml

2. I played with information from your mail. It was useful but too heavy.

3. To eases installation i started changing some stuff either in OpenEJB or
in your OSGI module.
The result is a set of features. But, i'm facing an issue with
openejb-loader and openejb-core.

Basically, we have openejb-core depending on openejb-loader.
And openejb-loader declares a required bundle: openejb-core. I would be nice
to get rid of this dependency.

To get it temporary working, i change some few things but it could
definitely be enhanced.

With features, you just need to do:

features:addUrl 
mvn:org.apache.openejb/openejb-core-osgi/3.1.2-SNAPSHOT/xml/features

features:list outputs
karaf@root> features:list
State         Version          Name                   Repository
[uninstalled] [5.0-2         ] javaee-api             repo-0
[uninstalled] [3.1.2-SNAPSHOT] openejb-loader         repo-0
[uninstalled] [3.1.2-SNAPSHOT] openejb-api            repo-0
[uninstalled] [3.1.2-SNAPSHOT] openejb-javaagent      repo-0
[uninstalled] [3.1.2-SNAPSHOT] openejb-jee            repo-0
[uninstalled] [3.1.2-SNAPSHOT] ejb31-api-experimental repo-0
[uninstalled] [3.1.2-SNAPSHOT] openejb-core           repo-0
[uninstalled] [3.1.2-SNAPSHOT] openejb-core-osgi      repo-0
[uninstalled] [2.5.6.SEC01   ] spring                 karaf-1.0.0
[uninstalled] [1.2.0         ] spring-dm              karaf-1.0.0
[uninstalled] [1.0.0         ] wrapper                karaf-1.0.0
[uninstalled] [1.0.0         ] obr                    karaf-1.0.0
[uninstalled] [1.0.0         ] http                   karaf-1.0.0
[uninstalled] [1.0.0         ] webconsole             karaf-1.0.0
[installed  ] [1.0.0         ] ssh                    karaf-1.0.0
[installed  ] [1.0.0         ] management             karaf-1.0.0

i'd like to just do a features:install openejb-core-osgi.

If you are interesting i'm more than happy to commit or to share something.

Hope it helps.
Jean-Louis



Jacek Laskowski wrote:
> 
> Hi,
> 
> With the recent changes in the openejb repo as far as MANIFEST.MF
> generation goes and the new openejb-core-osgi project/bundle, it seems
> that OpenEJB boots up fine within OSGi framework - Apache Felix 2.0.1.
> If you fancy giving it a try, do the following. I'd appreciate if it's
> verified on another machine before me going further with the openejb
> osgification. Make sure you're working with the latest openejb
> sources. Comments welcome. It looks it's on time with Geronimo
> osgification. I couldn't have wished more.
> 
> Download felix-framework-2.0.1.tar.gz and install it
> 
> Change its conf/config.properties so that it contains
> felix.log.level=4 (more information on wiring) and
> org.osgi.framework.system.packages.extra=sun.misc
> 
> Change default.properties in bin/felix.jar -> javax.transaction turned off
>  jar xf felix.jar default.properties
>  sed 's,javax.transaction,#javax.transaction,' default.properties >
> default.properties.NOWY
>  cp default.properties.NOWY default.properties
>  jar uf felix.jar default.properties
>  rm default.properties*
> 
> Run Felix - java -jar bin/felix.jar "c:\openejb-osgi\felix-cache"
> jlaskowski@work /cygdrive/c/openejb-osgi/felix-framework-2.0.1
> $ java -jar bin/felix.jar "c:\openejb-osgi\felix-cache"
> 
> Welcome to Felix
> ================
> 
> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 1.0 -> org.osgi.service.log -> 2.0
> DEBUG: WIRE: 1.0 -> org.osgi.service.url -> 0
> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 2.0 -> org.osgi.service.packageadmin -> 0
> DEBUG: WIRE: 2.0 -> org.osgi.service.startlevel -> 0
> DEBUG: DYNAMIC WIRE: 1.0 -> org.apache.felix.shell -> 2.0
> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 2.0
> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.1)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.2)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.1)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> 
> Install the following bundles (make sure you're online as some are
> pulled down from the Internet). Execute the following commands from
> within felix console:
> 
> install
> file:C:/.m2/org/apache/openejb/openejb-core/3.1.2-SNAPSHOT/openejb-core-3.1.2-SNAPSHOT.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.1.1/geronimo-annotation_1.0_spec-1.1.1.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-ejb_3.0_spec/1.0.1/geronimo-ejb_3.0_spec-1.0.1.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-interceptor_3.0_spec/1.0.1/geronimo-interceptor_3.0_spec-1.0.1.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.6/geronimo-javamail_1.4_spec-1.6.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-j2ee-management_1.1_spec/1.0.1/geronimo-j2ee-management_1.1_spec-1.0.1.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/1.1.1/geronimo-jpa_3.0_spec-1.1.1.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/2.0.0/geronimo-j2ee-connector_1.5_spec-2.0.0.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/specs/geronimo-jacc_1.1_spec/1.0.2/geronimo-jacc_1.1_spec-1.0.2.jar
> install
> http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.wsdl4j/1.6.1_1/org.apache.servicemix.bundles.wsdl4j-1.6.1_1.jar
> install
> http://download.eclipse.org/tools/orbit/downloads/drops/R20090825191606/bundles/org.apache.commons.cli_1.0.0.v20080604-1500.jar
> install
> http://download.eclipse.org/tools/orbit/downloads/drops/R20090825191606/bundles/org.apache.commons.lang_2.4.0.v20081016-1030.jar
> install
> http://download.eclipse.org/tools/orbit/downloads/drops/R20090825191606/bundles/org.apache.commons.logging_1.1.1.v200904062255.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/components/geronimo-connector/2.1.3/geronimo-connector-2.1.3.jar
> install
> http://repo2.maven.org/maven2/org/apache/geronimo/components/geronimo-transaction/2.1.3/geronimo-transaction-2.1.3.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-jee/3.1.2-SNAPSHOT/openejb-jee-3.1.2-SNAPSHOT.jar
> install
> file:C:/.m2/org/apache/openejb/openejb-loader/3.1.2-SNAPSHOT/openejb-loader-3.1.2-SNAPSHOT.jar
> install
> file:C:\.m2\org\apache\xbean\xbean-asm-shaded\3.7-SNAPSHOT\xbean-asm-shaded-3.7-SNAPSHOT.jar
> install
> file:C:\.m2\org\apache\xbean\xbean-finder-shaded\3.7-SNAPSHOT\xbean-finder-shaded-3.7-SNAPSHOT.jar
> install
> file:C:\.m2\org\apache\xbean\xbean-naming\3.7-SNAPSHOT\xbean-naming-3.7-SNAPSHOT.jar
> install
> file:C:\.m2\org\apache\xbean\xbean-reflect\3.7-SNAPSHOT\xbean-reflect-3.7-SNAPSHOT.jar
> 
> Execute "start 4" and Core is up.
> 
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.1)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.2)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.1)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [   4] [Active     ] [    1] Apache OpenEJB :: Container :: Core
> (3.1.2.SNAPSHOT)
> [   5] [Resolved   ] [    1] geronimo-annotation_1.0_spec (1.1.1)
> [   6] [Resolved   ] [    1] geronimo-ejb_3.0_spec (1.0.1)
> [   7] [Resolved   ] [    1] geronimo-jta_1.1_spec (1.1.1)
> [   8] [Resolved   ] [    1] geronimo-interceptor_3.0_spec (1.0.1)
> [   9] [Resolved   ] [    1] geronimo-javamail_1.4_spec (1.6)
> [  10] [Resolved   ] [    1] geronimo-j2ee-management_1.1_spec (1.0.1)
> [  11] [Resolved   ] [    1] geronimo-jpa_3.0_spec (1.1.1)
> [  12] [Resolved   ] [    1] geronimo-j2ee-connector_1.5_spec (2.0.0)
> [  13] [Resolved   ] [    1] J2EE JACC 1.1 (1.0.2)
> [  14] [Resolved   ] [    1] Apache ServiceMix Bundles: wsdl4j-1.6.1
> (1.6.1.1)
> [  16] [Resolved   ] [    1] OPS4J Pax Logging - API (1.4)
> [  17] [Resolved   ] [    1] pluginName (1.0.0.v20080604-1500)
> [  18] [Resolved   ] [    1] Apache Jakarta Commons Lang
> (2.4.0.v20081016-1030)
> [  19] [Resolved   ] [    1] Apache Commons Logging Plug-in
> (1.1.1.v200904062255)
> [  20] [Resolved   ] [    1] Geronimo TxManager :: Connector (2.1.3)
> [  21] [Resolved   ] [    1] Geronimo TxManager :: Transaction (2.1.3)
> [  22] [Resolved   ] [    1] Apache OpenEJB :: Container :: API
> (3.1.2.SNAPSHOT)
> [  23] [Resolved   ] [    1] Apache OpenEJB :: Container :: Java Agent
> (3.1.2.SNAPSHOT)
> [  24] [Resolved   ] [    1] Apache OpenEJB :: Container :: Java EE
> (3.1.2.SNAPSHOT)
> [  25] [Resolved   ] [    1] Apache OpenEJB :: Container :: Loader
> (3.1.2.SNAPSHOT)
> [  27] [Resolved   ] [    1] Apache XBean :: ASM shaded (repackaged)
> (3.7.0.SNAPSHOT)
> [  28] [Resolved   ] [    1] Apache XBean :: Finder shaded
> (repackaged) (3.7.0.SNAPSHOT)
> [  29] [Resolved   ] [    1] Apache XBean :: Naming (3.7.0.SNAPSHOT)
> [  30] [Resolved   ] [    1] Apache XBean :: Reflect (3.7.0.SNAPSHOT)
> 
> Install the new bundle from
> http://svn.apache.org/repos/asf/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi.
> Build it locally so it's in Maven's local repo.
> install
> file:C:\.m2\org\apache\openejb\openejb-core-osgi\3.1.2-SNAPSHOT\openejb-core-osgi-3.1.2-SNAPSHOT.jar
> 
> Install OPS4J wrap bundle and start it
> install
> http://repo1.maven.org/maven2/org/ops4j/pax/url/pax-url-wrap/1.1.2/pax-url-wrap-1.1.2.jar
> 
> install
> wrap:http://repo2.maven.org/maven2/org/apache/activemq/activemq-ra/4.1.1/activemq-ra-4.1.1.jar
> install
> wrap:http://repo2.maven.org/maven2/org/apache/activemq/activemq-core/4.1.1/activemq-core-4.1.1.jar
> 
> Bounce felix with
> -Dopenejb.log.factory=org.apache.openejb.util.JuliLogStreamFactory on
> the command line:
> java -Dopenejb.log.factory=org.apache.openejb.util.JuliLogStreamFactory
> -jar bin/felix.jar "c:\openejb-osgi\felix-cache"
> 
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.1)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.2)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.1)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [   4] [Active     ] [    1] Apache OpenEJB :: Container :: Core
> (3.1.2.SNAPSHOT)
> [   5] [Resolved   ] [    1] geronimo-annotation_1.0_spec (1.1.1)
> [   6] [Resolved   ] [    1] geronimo-ejb_3.0_spec (1.0.1)
> [   7] [Resolved   ] [    1] geronimo-jta_1.1_spec (1.1.1)
> [   8] [Resolved   ] [    1] geronimo-interceptor_3.0_spec (1.0.1)
> [   9] [Resolved   ] [    1] geronimo-javamail_1.4_spec (1.6)
> [  10] [Resolved   ] [    1] geronimo-j2ee-management_1.1_spec (1.0.1)
> [  11] [Resolved   ] [    1] geronimo-jpa_3.0_spec (1.1.1)
> [  12] [Resolved   ] [    1] geronimo-j2ee-connector_1.5_spec (2.0.0)
> [  13] [Resolved   ] [    1] J2EE JACC 1.1 (1.0.2)
> [  14] [Resolved   ] [    1] Apache ServiceMix Bundles: wsdl4j-1.6.1
> (1.6.1.1)
> [  16] [Resolved   ] [    1] OPS4J Pax Logging - API (1.4)
> [  17] [Resolved   ] [    1] pluginName (1.0.0.v20080604-1500)
> [  18] [Resolved   ] [    1] Apache Jakarta Commons Lang
> (2.4.0.v20081016-1030)
> [  19] [Resolved   ] [    1] Apache Commons Logging Plug-in
> (1.1.1.v200904062255)
> [  20] [Resolved   ] [    1] Geronimo TxManager :: Connector (2.1.3)
> [  21] [Resolved   ] [    1] Geronimo TxManager :: Transaction (2.1.3)
> [  22] [Resolved   ] [    1] Apache OpenEJB :: Container :: API
> (3.1.2.SNAPSHOT)
> [  23] [Resolved   ] [    1] Apache OpenEJB :: Container :: Java Agent
> (3.1.2.SNAPSHOT)
> [  24] [Resolved   ] [    1] Apache OpenEJB :: Container :: Java EE
> (3.1.2.SNAPSHOT)
> [  25] [Resolved   ] [    1] Apache OpenEJB :: Container :: Loader
> (3.1.2.SNAPSHOT)
> [  27] [Resolved   ] [    1] Apache XBean :: ASM shaded (repackaged)
> (3.7.0.SNAPSHOT)
> [  28] [Resolved   ] [    1] Apache XBean :: Finder shaded
> (repackaged) (3.7.0.SNAPSHOT)
> [  29] [Resolved   ] [    1] Apache XBean :: Naming (3.7.0.SNAPSHOT)
> [  30] [Resolved   ] [    1] Apache XBean :: Reflect (3.7.0.SNAPSHOT)
> [  31] [Active     ] [    1] Apache OpenEJB :: Container :: Core ::
> OSGi (3.1.2.SNAPSHOT)
> [  32] [Resolved   ] [    1] geronimo-jms_1.1_spec (1.1.1)
> [  35] [Active     ] [    1] OPS4J Pax Url - wrap: (1.1.2)
> [  36] [Resolved   ] [    1]
> wrap_http___repo2.maven.org_maven2_org_apache_activemq_activemq-core_4.1.1_activemq-core-4.1.1.jar
> (0)
> [  37] [Resolved   ] [    1]
> wrap_http___repo2.maven.org_maven2_org_apache_activemq_activemq-ra_4.1.1_activemq-ra-4.1.1.jar
> (0)
> 
> -> start 31
> Activator started
> DEBUG: juli.properties
> FATAL ERROR WHILE CONFIGURING LOGGING!!!. MISSING logging.properties FILE
> Apache OpenEJB ${pom.version}    build:
> @DATE-REPLACED-BY-MAVEN@-@TIME-REPLACED-BY-MAVEN@
> http://openejb.apache.org/
> 2009-10-23 22:39:53 org.apache.openejb.OpenEJB$Instance <init>
> INFO:
> ********************************************************************************
> OpenEJB http://openejb.apache.org/
> Startup: 23.10.09 22:39
> Copyright 1999-2009 (C) Apache OpenEJB Project, All Rights Reserved.
> Version: ${pom.version}
> Build date: @DATE-REPLACED-BY-MAVEN@
> Build time: @TIME-REPLACED-BY-MAVEN@
> ********************************************************************************
> 
> 
> 2009-10-23 22:39:53 org.apache.openejb.OpenEJB$Instance <init>
> INFO: openejb.home = C:\openejb-osgi\felix-framework-2.0.1
> 2009-10-23 22:39:53 org.apache.openejb.OpenEJB$Instance <init>
> INFO: openejb.base = C:\openejb-osgi\felix-framework-2.0.1
> DEBUG: META-INF/services/javax.xml.parsers.SAXParserFactory
> 2009-10-23 22:39:53 org.apache.openejb.config.ConfigurationFactory
> configureService
> INFO: Configuring Service(id=Default Security Service,
> type=SecurityService, provider-id=Default Security Service)
> 2009-10-23 22:39:53 org.apache.openejb.config.ConfigurationFactory
> configureService
> INFO: Configuring Service(id=Default Transaction Manager,
> type=TransactionManager, provider-id=Default Transaction Manager)
> 2009-10-23 22:39:53 org.apache.openejb.config.ConfigurationFactory
> configureService
> INFO: Configuring Service(id=My Stateless Container, type=Container,
> provider-id=Default Stateless Container)
> 2009-10-23 22:39:53 org.apache.openejb.util.OptionsLog info
> INFO: Using 'openejb.deployments.classpath=false'
> 2009-10-23 22:39:53 org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating TransactionManager(id=Default Transaction Manager)
> 2009-10-23 22:39:53 org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating SecurityService(id=Default Security Service)
> 2009-10-23 22:39:53 org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating Container(id=My Stateless Container)
> 
> OpenEJB *seems* running fine.
> 
> The missing pieces are to create a service bundle so JNDI namespace is
> visible to other bundles being ejb clients or exposing ejb interfaces
> as osgi services and finally create a osgified deployer (picks up
> instaled bundles that are ejbs as well, passes them to openejb and
> registers osgi services). Fancy helping out?
> 
> Jacek
> 
> -- 
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
> 
> 

-- 
View this message in context: http://www.nabble.com/For-adventurous%3A-first-run-of-OSGified-OpenEJB-*seems*-running-fine-tp26033567p26097939.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.


Mime
View raw message