openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <ja...@laskowski.net.pl>
Subject For adventurous: first run of OSGified OpenEJB *seems* running fine
Date Fri, 23 Oct 2009 21:36:11 GMT
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

Mime
View raw message