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/23 23:36:11 UTC

For adventurous: first run of OSGified OpenEJB *seems* running fine

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Wed, Oct 28, 2009 at 11:44 PM, Mohammad Nour El-Din
<no...@gmail.com> wrote:
> Jacek I did a damn mistake by deleting the cache thought there is
> something wrong with it but it is like I removed all bundles I
> installed few days ago. But before doing that I got the same error
> about javax.transaction thing related to bundle of openejb loader. I
> will restart the thing all over again will not do that till tomorrow
> night or maybe even on Friday. Sorry pal :(.

Don't forget to build openejb again as I committed some important
OSGi-related changes. I hope they made a difference and openejb will
start up from the very beginning.

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Jacek I did a damn mistake by deleting the cache thought there is
something wrong with it but it is like I removed all bundles I
installed few days ago. But before doing that I got the same error
about javax.transaction thing related to bundle of openejb loader. I
will restart the thing all over again will not do that till tomorrow
night or maybe even on Friday. Sorry pal :(.

On Wed, Oct 28, 2009 at 7:48 PM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
> On Wed, Oct 28, 2009 at 5:38 PM, Jean-Louis MONTEIRO
> <je...@atosorigin.com> wrote:
>
>> First of all, i went to Felix-Karaf 1.0.0 which is a bit for user friendly
>
> I've been wondering what Karaf was having seen it in use in Geronimo
> osgification. I'm glad you used it so I'm encourage to do so if it
> gets things easier.
>
>> 1. For some strange reasons, installing osgi bundles using Pax mvn url
>> handler didn't run fine (not able to find my proxy settings).
>
> Why did you have to use it at all? Was it as a replacement for
> installing bundles from maven repos using http?
>
>> 2. I played with information from your mail. It was useful but too heavy.
>
> It will get easier when I (or someone else) prepare appropriate config
> file and the necessary bundles get installed automatically. Anyway,
> I'm all ears to hear how the process can get simpler.
>
>> 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.
>
> +1 if it gets the osgification simpler. Having a bundle required is
> just a way to link bundles together and they can get installed by not
> started. Starting a bundle resolves imports so it's not a cyclic
> dependency because only openejb-core has to be started.
>
>> 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 don't understand it yet - it looks karaf-specific which I would
> avoid unless it's required. Could you explain what it is for?
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Guillaume Nodet <gn...@gmail.com>.
FWIW, Karaf embeds both equinox and felix.  The default configuraton
uses felix, but the switch is simply to edit the etc/config.properties
file and change the appropriate property to "equinox" and restart.

If you need any help in the Karaf area, let me know, i'd be glad to help.

On Thu, Oct 29, 2009 at 10:56, Jean-Louis MONTEIRO
<je...@atosorigin.com> wrote:
>
>
>> First of all, i went to Felix-Karaf 1.0.0 which is a bit for user friendly
>
> I've been wondering what Karaf was having seen it in use in Geronimo
> osgification. I'm glad you used it so I'm encourage to do so if it
> gets things easier.
>
>
> Jacek Laskowski wrote:
>>
>> Actually, Karaf relies on Felix for its OSGi platform. But it provides a
>> set of useful tools and configuration.
>> Some details are available here
>> http://felix.apache.org/site/apache-felix-karaf.html
>>
>
>> 1. For some strange reasons, installing osgi bundles using Pax mvn url
>> handler didn't run fine (not able to find my proxy settings).
>
> Why did you have to use it at all? Was it as a replacement for
> installing bundles from maven repos using http?
>
>
> Jacek Laskowski wrote:
>>
>> Absolutely!
>> I like the idea to use maven behavior to install bundles.
>> I mean osgi:install mvn:<groupId>/<artifactId>/<version> instead of
>> specifying a repository with an hard coded URL.
>>
>
>
>> 2. I played with information from your mail. It was useful but too heavy.
>
> It will get easier when I (or someone else) prepare appropriate config
> file and the necessary bundles get installed automatically. Anyway,
> I'm all ears to hear how the process can get simpler.
>
>
> Jacek Laskowski wrote:
>>
>> Using features is easier.
>> I changed the openejb-core-osgi module to add features
>> generation/deployment on maven.
>>
>
>> 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.
>
> +1 if it gets the osgification simpler. Having a bundle required is
> just a way to link bundles together and they can get installed by not
> started. Starting a bundle resolves imports so it's not a cyclic
> dependency because only openejb-core has to be started.
>
>
> Jacek Laskowski wrote:
>>
>> I got it working even if i'm not really happy with. IMO, we should review
>> loader stuff.
>> For example, in the Activator, the loader is used to initialize the
>> container whereas OpenEJB.destroy() is directly used to shutdown the
>> container.
>>
>
>> 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 don't understand it yet - it looks karaf-specific which I would
> avoid unless it's required. Could you explain what it is for?
>
>
> Jacek Laskowski wrote:
>>
>> May be the best, is to try it!
>> Basically, a feature is a set of bundles.
>> For example, instead of installing all APIs using something like
>> # install osgi bundles using mvn url handler
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.0.2
>> osgi:install mvn:org.apache.geronimo.specs/geronimo-javamail_1.4_spec/1.6
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1
>> osgi:install mvn:org.apache.geronimo.specs/geronimo-ejb_3.0_spec/1.0.1
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-interceptor_3.0_spec/1.0.1
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-j2ee-deployment_1.1_spec/1.1
>> ...
>>
>> you just need to do a features:install javaee-api.
>>
>>
>
> Regarding logging, i had an issue with our log4j usage.
> On Karaf, Pax Logging is installed be default so you can use the Log4j
> logger in your application, but you cannot use internal APIs (have a look
> here  http://lists.ops4j.org/pipermail/general/2009q3/002509.html
> http://lists.ops4j.org/pipermail/general/2009q3/002509.html ). So I got a
> ClassNotFoundException with org/apache/log4j/Layout.
>
> By the way, I saw your activation code afterward, specially
> env.setProperty("openejb.log.factory",
> "org.apache.openejb.util.JuliLogStreamFactory");
>
> But it didn't work for me.
> In the org.apache.openejb.util.Logger class, we do
> System.getProperty("openejb.log.factory") instead of
> SystemInstance.get().getProperty("openejb.log.factory");
>
> I changed some other code to avoid System property usage and now it works
> (or it should work) if you provide a embedded.juli.properties in the bundle.
>
> Another solution is to create a conf/ directory in KARAF_HOME
> (=OPENEJB_HOME).
>
> Anyway, just for fun :) i change the Log4jLogStreamFactory to be able to use
> Log4j with OSGi and PaxLogging.
>
> Jean-Louis
> --
> View this message in context: http://www.nabble.com/For-adventurous%3A-first-run-of-OSGified-OpenEJB-*seems*-running-fine-tp26033567p26110134.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Wed, Nov 4, 2009 at 1:10 AM, Jonathan Gallimore
<jo...@gmail.com> wrote:

> The plugin itself listens for EJB bundles like this:
>         ServiceListener sl = new ServiceListener() {
>
>            public void serviceChanged(ServiceEvent ev) {
>                ServiceReference sr = ev.getServiceReference();
>                switch (ev.getType()) {
>
>                case ServiceEvent.REGISTERED:
>                    deployApplication(sr);
>                    break;
>
>                case ServiceEvent.UNREGISTERING:
>                    undeployApplication(sr);
>                    break;
>                }
>            }
>        };
>        // Generate a ServiceEvent for any existing OpenEJbApplication
> services.
>
>        String filter = "(objectclass=" + OpenEjbApplication.class.getName()
> + ")";
>        try {
>            bundleContext.addServiceListener(sl, filter);
>            ServiceReference[] srl =
> bundleContext.getServiceReferences(null, filter);
>            if (srl != null) {
>                for (ServiceReference sr : srl) {
>                    sl.serviceChanged(new
> ServiceEvent(ServiceEvent.REGISTERED, sr));
>                }
>            }
>        } catch (InvalidSyntaxException e) {
>            e.printStackTrace();
>        }
>
> The EJB bundle calls this on startup:
>
>        OpenEjbApplication application = new OpenEjbApplication(bundle);
>        context.registerService(OpenEjbApplication.class.getName(),
> application, null);


That's exactly how I wish it worked. OpenEJB would emit events upon
successful/unsuccessful deployment or any other interesting changes in
its work. Clean as far as OSGi's concerned. I didn't mean to introduce
any osgi changes in the main code before we really settle on it. I
didn't look at the source code of the plugin, but it turns out I'll
have to. Thanks.

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jonathan Gallimore <jo...@gmail.com>.
I've been reading this thread with a lot of interest, this is looking like a
really nice piece of functionality. I've had a bit too much on my plate to
have a proper play around with this functionality but I'm hoping to get into
shortly.

>
>
> 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?
>

One thing I did mean to mention here was that in the Eclipse plugin we have
a org.apache.openejb.server plugin, which was contributed a while back by
Deryck Brown, to help build an Eclipse RCP application with OpenEJB embedded
in it. This contribution has some code which listens for certain services
being registered with the OSGi container, and deploying the app with
OpenEJB. The org.apache.openejb.server wraps all of OpenEJB presenting it as
one big bundle, and I've only had it working with Equinox, but I wonder
whether whether this code might be useful or not.

The plugin itself listens for EJB bundles like this:
         ServiceListener sl = new ServiceListener() {

            public void serviceChanged(ServiceEvent ev) {
                ServiceReference sr = ev.getServiceReference();
                switch (ev.getType()) {

                case ServiceEvent.REGISTERED:
                    deployApplication(sr);
                    break;

                case ServiceEvent.UNREGISTERING:
                    undeployApplication(sr);
                    break;
                }
            }
        };

        // Generate a ServiceEvent for any existing OpenEJbApplication
services.

        String filter = "(objectclass=" + OpenEjbApplication.class.getName()
+ ")";
        try {
            bundleContext.addServiceListener(sl, filter);
            ServiceReference[] srl =
bundleContext.getServiceReferences(null, filter);
            if (srl != null) {
                for (ServiceReference sr : srl) {
                    sl.serviceChanged(new
ServiceEvent(ServiceEvent.REGISTERED, sr));
                }
            }
        } catch (InvalidSyntaxException e) {
            e.printStackTrace();
        }

The EJB bundle calls this on startup:

        OpenEjbApplication application = new OpenEjbApplication(bundle);
        context.registerService(OpenEjbApplication.class.getName(),
application, null);


Anyway, I don't know if its any use, but I thought I'd mention it.

Thanks for the work you've done on this - hopefully I'll give it a go some
point this week and give you some feedback.

Jon

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
:S, errors again, Headers is attached :(


C:\program-files\felix-framework-2.0.1>%JAVA_HOME%\bin\java -jar
bin\felix.jar "cache\openejb"

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
-> ERROR: Error starting
file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org
.apache.openejb.loader [25]: package;
(&(package=javax.transaction)(version>=5.0.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.openejb.loader [25]: package;
(&(package=javax.transaction)(version>=5.0.0))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)
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)
[   5] [Installed  ] [    1] Apache OpenEJB :: Container :: Core
(3.1.2.SNAPSHOT)
[   6] [Installed  ] [    1] geronimo-annotation_1.0_spec (1.1.1)
[   8] [Installed  ] [    1] geronimo-jta_1.1_spec (1.1.1)
[   9] [Installed  ] [    1] geronimo-interceptor_3.0_spec (1.0.1)
[  10] [Installed  ] [    1] geronimo-javamail_1.4_spec (1.6)
[  11] [Installed  ] [    1] geronimo-j2ee-management_1.1_spec (1.0.1)
[  12] [Installed  ] [    1] geronimo-jpa_3.0_spec (1.1.1)
[  13] [Installed  ] [    1] geronimo-j2ee-connector_1.5_spec (2.0.0)
[  14] [Installed  ] [    1] J2EE JACC 1.1 (1.0.2)
[  15] [Installed  ] [    1] Apache ServiceMix Bundles: wsdl4j-1.6.1 (1.6.1.1)
[  16] [Installed  ] [    1] pluginName (1.0.0.v20080604-1500)
[  17] [Installed  ] [    1] Apache Jakarta Commons Lang (2.4.0.v20081016-1030)
[  18] [Installed  ] [    1] Apache Commons Logging Plug-in
(1.1.1.v200904062255)
[  19] [Installed  ] [    1] Geronimo TxManager :: Connector (2.1.3)
[  20] [Installed  ] [    1] Geronimo TxManager :: Transaction (2.1.3)
[  22] [Installed  ] [    1] Apache OpenEJB :: Container :: API (3.1.2.SNAPSHOT)
[  23] [Installed  ] [    1] Apache OpenEJB :: Container :: Java Agent
(3.1.2.SNAPSHOT)
[  24] [Installed  ] [    1] Apache OpenEJB :: Container :: Java EE
(3.1.2.SNAPSHOT)
[  25] [Installed  ] [    1] Apache OpenEJB :: Container :: Loader
(3.1.2.SNAPSHOT)
[  26] [Installed  ] [    1] Apache XBean :: ASM shaded (repackaged) (3.6)
[  27] [Installed  ] [    1] Apache XBean :: Finder shaded (repackaged) (3.6)
[  29] [Installed  ] [    1] Apache XBean :: Naming (3.6)
[  30] [Installed  ] [    1] Apache XBean :: Reflect (3.6)
[  31] [Installed  ] [    1] OPS4J Pax Logging - API (1.4)
[  32] [Installed  ] [    1] EJB 3.1 (1.0.0.EA1-SNAPSHOT)
-> inspect package requirement 25
org.apache.openejb.loader [25] imports packages:
------------------------------------------------
Nothing
-> inspect package requirement 5
org.apache.openejb.core [5] imports packages:
---------------------------------------------
Nothing
-> inspect package capability 25
org.apache.openejb.loader [25] exports packages:
------------------------------------------------
Nothing
-> inspect package capability 5
org.apache.openejb.core [5] exports packages:
---------------------------------------------
Nothing
->


On Mon, Nov 2, 2009 at 12:48 AM, Mohammad Nour El-Din
<no...@gmail.com> wrote:
> np :), thanks for the help.
>
> On Mon, Nov 2, 2009 at 12:46 AM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
>> On Sun, Nov 1, 2009 at 10:31 PM, Mohammad Nour El-Din
>> <no...@gmail.com> wrote:
>>
>>> ERROR: Error starting
>>> file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
>>> (org.osgi.framework.BundleException: Unresolved constraint in bundle
>>> org.apache.openejb.core [5]: package; (&(package=javax.ejb)(version>=3.1.0)))
>>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>>> org.apache.openejb.core [5]: package;
>>> (&(package=javax.ejb)(version>=3.1.0))
>> ...
>>> [   7] [Installed  ] [    1] geronimo-ejb_3.0_spec (1.0.1)
>>
>> Uninstall this one (uninstall 7) and install
>> file:C:\.m2\org\apache\geronimo\specs\geronimo-ejb_3.1_spec\1.0.0-EA1-SNAPSHOT\geronimo-ejb_3.1_spec-1.0.0-EA1-SNAPSHOT.jar.
>> You'll have to build it from the sources at
>> http://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-ejb_3.1_spec.
>>
>> It all was not necessary at the time I had described the steps, but
>> time passed and some changes were introduced for openejb-core which
>> made quite a bit difference in the way how OpenEJB osgified works now.
>> That's why you're facing the issues. Sorry.
>>
>> Jacek
>>
>> --
>> Jacek Laskowski
>> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>>
>
>
>
> --
> Thanks
> - Mohammad Nour
> - LinkedIn: http://www.linkedin.com/in/mnour
> ----
> "Life is like riding a bicycle. To keep your balance you must keep moving"
> - Albert Einstein
>
> "Writing clean code is what you must do in order to call yourself a
> professional. There is no reasonable excuse for doing anything less
> than your best."
> - Clean Code: A Handbook of Agile Software Craftsmanship
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
np :), thanks for the help.

On Mon, Nov 2, 2009 at 12:46 AM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
> On Sun, Nov 1, 2009 at 10:31 PM, Mohammad Nour El-Din
> <no...@gmail.com> wrote:
>
>> ERROR: Error starting
>> file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
>> (org.osgi.framework.BundleException: Unresolved constraint in bundle
>> org.apache.openejb.core [5]: package; (&(package=javax.ejb)(version>=3.1.0)))
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> org.apache.openejb.core [5]: package;
>> (&(package=javax.ejb)(version>=3.1.0))
> ...
>> [   7] [Installed  ] [    1] geronimo-ejb_3.0_spec (1.0.1)
>
> Uninstall this one (uninstall 7) and install
> file:C:\.m2\org\apache\geronimo\specs\geronimo-ejb_3.1_spec\1.0.0-EA1-SNAPSHOT\geronimo-ejb_3.1_spec-1.0.0-EA1-SNAPSHOT.jar.
> You'll have to build it from the sources at
> http://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-ejb_3.1_spec.
>
> It all was not necessary at the time I had described the steps, but
> time passed and some changes were introduced for openejb-core which
> made quite a bit difference in the way how OpenEJB osgified works now.
> That's why you're facing the issues. Sorry.
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Sun, Nov 1, 2009 at 10:31 PM, Mohammad Nour El-Din
<no...@gmail.com> wrote:

> ERROR: Error starting
> file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.openejb.core [5]: package; (&(package=javax.ejb)(version>=3.1.0)))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.openejb.core [5]: package;
> (&(package=javax.ejb)(version>=3.1.0))
...
> [   7] [Installed  ] [    1] geronimo-ejb_3.0_spec (1.0.1)

Uninstall this one (uninstall 7) and install
file:C:\.m2\org\apache\geronimo\specs\geronimo-ejb_3.1_spec\1.0.0-EA1-SNAPSHOT\geronimo-ejb_3.1_spec-1.0.0-EA1-SNAPSHOT.jar.
You'll have to build it from the sources at
http://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-ejb_3.1_spec.

It all was not necessary at the time I had described the steps, but
time passed and some changes were introduced for openejb-core which
made quite a bit difference in the way how OpenEJB osgified works now.
That's why you're facing the issues. Sorry.

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hey Jacek...

   I gave a shot tonight and I got this error, pleas help :(, I also
attached the headers.

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

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: 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: 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
ERROR: Error starting
file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org.ap
ache.openejb.core [5]: package; (&(package=javax.ejb)(version>=3.1.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.openejb.core [5]: package;
(&(package=javax.ejb)(version>=3.1.0))
->      at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)
inspect package cpability 5
Invalid argument: cpability
-> inspect package capability 5
org.apache.openejb.core [5] exports packages:
---------------------------------------------
Nothing
-> inspect package requirement 5
org.apache.openejb.core [5] imports packages:
---------------------------------------------
Nothing
-> 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)
[   5] [Installed  ] [    1] Apache OpenEJB :: Container :: Core
(3.1.2.SNAPSHOT)
[   6] [Installed  ] [    1] geronimo-annotation_1.0_spec (1.1.1)
[   7] [Installed  ] [    1] geronimo-ejb_3.0_spec (1.0.1)
[   8] [Installed  ] [    1] geronimo-jta_1.1_spec (1.1.1)
[   9] [Installed  ] [    1] geronimo-interceptor_3.0_spec (1.0.1)
[  10] [Installed  ] [    1] geronimo-javamail_1.4_spec (1.6)
[  11] [Installed  ] [    1] geronimo-j2ee-management_1.1_spec (1.0.1)
[  12] [Installed  ] [    1] geronimo-jpa_3.0_spec (1.1.1)
[  13] [Installed  ] [    1] geronimo-j2ee-connector_1.5_spec (2.0.0)
[  14] [Installed  ] [    1] J2EE JACC 1.1 (1.0.2)
[  15] [Installed  ] [    1] Apache ServiceMix Bundles: wsdl4j-1.6.1 (1.6.1.1)
[  16] [Installed  ] [    1] pluginName (1.0.0.v20080604-1500)
[  17] [Installed  ] [    1] Apache Jakarta Commons Lang (2.4.0.v20081016-1030)
[  18] [Installed  ] [    1] Apache Commons Logging Plug-in
(1.1.1.v200904062255)
[  19] [Installed  ] [    1] Geronimo TxManager :: Connector (2.1.3)
[  20] [Installed  ] [    1] Geronimo TxManager :: Transaction (2.1.3)
[  22] [Installed  ] [    1] Apache OpenEJB :: Container :: API (3.1.2.SNAPSHOT)
[  23] [Installed  ] [    1] Apache OpenEJB :: Container :: Java Agent
(3.1.2.SNAPSHOT)
[  24] [Installed  ] [    1] Apache OpenEJB :: Container :: Java EE
(3.1.2.SNAPSHOT)
[  25] [Installed  ] [    1] Apache OpenEJB :: Container :: Loader
(3.1.2.SNAPSHOT)
[  26] [Installed  ] [    1] Apache XBean :: ASM shaded (repackaged) (3.6)
[  27] [Installed  ] [    1] Apache XBean :: Finder shaded (repackaged) (3.6)
[  29] [Installed  ] [    1] Apache XBean :: Naming (3.6)
[  30] [Installed  ] [    1] Apache XBean :: Reflect (3.6)
[  31] [Installed  ] [    1] OPS4J Pax Logging - API (1.4)

On Thu, Oct 29, 2009 at 9:36 PM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
> On Thu, Oct 29, 2009 at 6:15 PM, Quintin Beukes <qu...@skywalk.co.za> wrote:
>> How much of the actual OpenEJB code changes to do a shift like this (to
>> OSGi)?
>
> Almost nothing. The goal was to make as less changes as possible and
> introduce some to make openejb more modular. The bundles are in fact
> the maven modules themselves. Just add/remove imports/exports and it
> begun working with not much hassle on my part. I was really surprised
> when openejb booted up in osgi.
>
> OSGi is just an enhanced classloader platform with a notion of
> services. Each bundle is to provide exports for the other bundles
> which import them. That's the way class visibility is handled. The
> other part of OSGi is the service layer. That's exactly how EJB3
> works. You expose a business intf and that's what you see from a
> client's perspective - no real implementation. In OSGi you register a
> service in the service registry with a set of interfaces backed by an
> implementation. When a bundle is started its activator is fired that's
> in turn registers itself as a service provider or a service consumer.
> Throw some listeners into it and that's what OSGi is all about. Easy
> :)
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Thu, Oct 29, 2009 at 6:15 PM, Quintin Beukes <qu...@skywalk.co.za> wrote:
> How much of the actual OpenEJB code changes to do a shift like this (to
> OSGi)?

Almost nothing. The goal was to make as less changes as possible and
introduce some to make openejb more modular. The bundles are in fact
the maven modules themselves. Just add/remove imports/exports and it
begun working with not much hassle on my part. I was really surprised
when openejb booted up in osgi.

OSGi is just an enhanced classloader platform with a notion of
services. Each bundle is to provide exports for the other bundles
which import them. That's the way class visibility is handled. The
other part of OSGi is the service layer. That's exactly how EJB3
works. You expose a business intf and that's what you see from a
client's perspective - no real implementation. In OSGi you register a
service in the service registry with a set of interfaces backed by an
implementation. When a bundle is started its activator is fired that's
in turn registers itself as a service provider or a service consumer.
Throw some listeners into it and that's what OSGi is all about. Easy
:)

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Quintin Beukes <qu...@skywalk.co.za>.
How much of the actual OpenEJB code changes to do a shift like this (to
OSGi)?

Quintin Beukes


On Thu, Oct 29, 2009 at 12:33 PM, Jean-Louis MONTEIRO <
jean-louis.monteiro@atosorigin.com> wrote:

>
> Guillaume,
>
> Have a look here.
>
> http://svn.apache.org/repos/asf/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/filtered-resources/features.xml
>
> http://svn.apache.org/repos/asf/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/filtered-resources/features.xml
>
> Jean-Louis
>
>
> gnodet wrote:
> >
> > Btw, I was going to have a look at the features descriptor but could
> > not find it in svn ...  Has it been checked in already ?
> >
> > On Thu, Oct 29, 2009 at 10:56, Jean-Louis MONTEIRO
> > <je...@atosorigin.com> wrote:
> >>
> >>
> >>> First of all, i went to Felix-Karaf 1.0.0 which is a bit for user
> >>> friendly
> >>
> >> I've been wondering what Karaf was having seen it in use in Geronimo
> >> osgification. I'm glad you used it so I'm encourage to do so if it
> >> gets things easier.
> >>
> >>
> >> Jacek Laskowski wrote:
> >>>
> >>> Actually, Karaf relies on Felix for its OSGi platform. But it provides
> a
> >>> set of useful tools and configuration.
> >>> Some details are available here
> >>> http://felix.apache.org/site/apache-felix-karaf.html
> >>>
> >>
> >>> 1. For some strange reasons, installing osgi bundles using Pax mvn url
> >>> handler didn't run fine (not able to find my proxy settings).
> >>
> >> Why did you have to use it at all? Was it as a replacement for
> >> installing bundles from maven repos using http?
> >>
> >>
> >> Jacek Laskowski wrote:
> >>>
> >>> Absolutely!
> >>> I like the idea to use maven behavior to install bundles.
> >>> I mean osgi:install mvn:<groupId>/<artifactId>/<version> instead of
> >>> specifying a repository with an hard coded URL.
> >>>
> >>
> >>
> >>> 2. I played with information from your mail. It was useful but too
> >>> heavy.
> >>
> >> It will get easier when I (or someone else) prepare appropriate config
> >> file and the necessary bundles get installed automatically. Anyway,
> >> I'm all ears to hear how the process can get simpler.
> >>
> >>
> >> Jacek Laskowski wrote:
> >>>
> >>> Using features is easier.
> >>> I changed the openejb-core-osgi module to add features
> >>> generation/deployment on maven.
> >>>
> >>
> >>> 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.
> >>
> >> +1 if it gets the osgification simpler. Having a bundle required is
> >> just a way to link bundles together and they can get installed by not
> >> started. Starting a bundle resolves imports so it's not a cyclic
> >> dependency because only openejb-core has to be started.
> >>
> >>
> >> Jacek Laskowski wrote:
> >>>
> >>> I got it working even if i'm not really happy with. IMO, we should
> >>> review
> >>> loader stuff.
> >>> For example, in the Activator, the loader is used to initialize the
> >>> container whereas OpenEJB.destroy() is directly used to shutdown the
> >>> container.
> >>>
> >>
> >>> 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 don't understand it yet - it looks karaf-specific which I would
> >> avoid unless it's required. Could you explain what it is for?
> >>
> >>
> >> Jacek Laskowski wrote:
> >>>
> >>> May be the best, is to try it!
> >>> Basically, a feature is a set of bundles.
> >>> For example, instead of installing all APIs using something like
> >>> # install osgi bundles using mvn url handler
> >>> osgi:install
> >>> mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.0.2
> >>> osgi:install
> >>> mvn:org.apache.geronimo.specs/geronimo-javamail_1.4_spec/1.6
> >>> osgi:install
> >>> mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1
> >>> osgi:install mvn:org.apache.geronimo.specs/geronimo-ejb_3.0_spec/1.0.1
> >>> osgi:install
> >>> mvn:org.apache.geronimo.specs/geronimo-interceptor_3.0_spec/1.0.1
> >>> osgi:install
> >>> mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0
> >>> osgi:install
> >>> mvn:org.apache.geronimo.specs/geronimo-j2ee-deployment_1.1_spec/1.1
> >>> ...
> >>>
> >>> you just need to do a features:install javaee-api.
> >>>
> >>>
> >>
> >> Regarding logging, i had an issue with our log4j usage.
> >> On Karaf, Pax Logging is installed be default so you can use the Log4j
> >> logger in your application, but you cannot use internal APIs (have a
> look
> >> here  http://lists.ops4j.org/pipermail/general/2009q3/002509.html
> >> http://lists.ops4j.org/pipermail/general/2009q3/002509.html ). So I got
> a
> >> ClassNotFoundException with org/apache/log4j/Layout.
> >>
> >> By the way, I saw your activation code afterward, specially
> >> env.setProperty("openejb.log.factory",
> >> "org.apache.openejb.util.JuliLogStreamFactory");
> >>
> >> But it didn't work for me.
> >> In the org.apache.openejb.util.Logger class, we do
> >> System.getProperty("openejb.log.factory") instead of
> >> SystemInstance.get().getProperty("openejb.log.factory");
> >>
> >> I changed some other code to avoid System property usage and now it
> works
> >> (or it should work) if you provide a embedded.juli.properties in the
> >> bundle.
> >>
> >> Another solution is to create a conf/ directory in KARAF_HOME
> >> (=OPENEJB_HOME).
> >>
> >> Anyway, just for fun :) i change the Log4jLogStreamFactory to be able to
> >> use
> >> Log4j with OSGi and PaxLogging.
> >>
> >> Jean-Louis
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/For-adventurous%3A-first-run-of-OSGified-OpenEJB-*seems*-running-fine-tp26033567p26110134.html
> >> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> > ------------------------
> > Open Source SOA
> > http://fusesource.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/For-adventurous%3A-first-run-of-OSGified-OpenEJB-*seems*-running-fine-tp26033567p26110631.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>
>

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

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

Have a look here.
http://svn.apache.org/repos/asf/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/filtered-resources/features.xml
http://svn.apache.org/repos/asf/openejb/trunk/sandbox/openejb-osgi/openejb-core-osgi/src/main/filtered-resources/features.xml 

Jean-Louis


gnodet wrote:
> 
> Btw, I was going to have a look at the features descriptor but could
> not find it in svn ...  Has it been checked in already ?
> 
> On Thu, Oct 29, 2009 at 10:56, Jean-Louis MONTEIRO
> <je...@atosorigin.com> wrote:
>>
>>
>>> First of all, i went to Felix-Karaf 1.0.0 which is a bit for user
>>> friendly
>>
>> I've been wondering what Karaf was having seen it in use in Geronimo
>> osgification. I'm glad you used it so I'm encourage to do so if it
>> gets things easier.
>>
>>
>> Jacek Laskowski wrote:
>>>
>>> Actually, Karaf relies on Felix for its OSGi platform. But it provides a
>>> set of useful tools and configuration.
>>> Some details are available here
>>> http://felix.apache.org/site/apache-felix-karaf.html
>>>
>>
>>> 1. For some strange reasons, installing osgi bundles using Pax mvn url
>>> handler didn't run fine (not able to find my proxy settings).
>>
>> Why did you have to use it at all? Was it as a replacement for
>> installing bundles from maven repos using http?
>>
>>
>> Jacek Laskowski wrote:
>>>
>>> Absolutely!
>>> I like the idea to use maven behavior to install bundles.
>>> I mean osgi:install mvn:<groupId>/<artifactId>/<version> instead of
>>> specifying a repository with an hard coded URL.
>>>
>>
>>
>>> 2. I played with information from your mail. It was useful but too
>>> heavy.
>>
>> It will get easier when I (or someone else) prepare appropriate config
>> file and the necessary bundles get installed automatically. Anyway,
>> I'm all ears to hear how the process can get simpler.
>>
>>
>> Jacek Laskowski wrote:
>>>
>>> Using features is easier.
>>> I changed the openejb-core-osgi module to add features
>>> generation/deployment on maven.
>>>
>>
>>> 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.
>>
>> +1 if it gets the osgification simpler. Having a bundle required is
>> just a way to link bundles together and they can get installed by not
>> started. Starting a bundle resolves imports so it's not a cyclic
>> dependency because only openejb-core has to be started.
>>
>>
>> Jacek Laskowski wrote:
>>>
>>> I got it working even if i'm not really happy with. IMO, we should
>>> review
>>> loader stuff.
>>> For example, in the Activator, the loader is used to initialize the
>>> container whereas OpenEJB.destroy() is directly used to shutdown the
>>> container.
>>>
>>
>>> 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 don't understand it yet - it looks karaf-specific which I would
>> avoid unless it's required. Could you explain what it is for?
>>
>>
>> Jacek Laskowski wrote:
>>>
>>> May be the best, is to try it!
>>> Basically, a feature is a set of bundles.
>>> For example, instead of installing all APIs using something like
>>> # install osgi bundles using mvn url handler
>>> osgi:install
>>> mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.0.2
>>> osgi:install
>>> mvn:org.apache.geronimo.specs/geronimo-javamail_1.4_spec/1.6
>>> osgi:install
>>> mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1
>>> osgi:install mvn:org.apache.geronimo.specs/geronimo-ejb_3.0_spec/1.0.1
>>> osgi:install
>>> mvn:org.apache.geronimo.specs/geronimo-interceptor_3.0_spec/1.0.1
>>> osgi:install
>>> mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0
>>> osgi:install
>>> mvn:org.apache.geronimo.specs/geronimo-j2ee-deployment_1.1_spec/1.1
>>> ...
>>>
>>> you just need to do a features:install javaee-api.
>>>
>>>
>>
>> Regarding logging, i had an issue with our log4j usage.
>> On Karaf, Pax Logging is installed be default so you can use the Log4j
>> logger in your application, but you cannot use internal APIs (have a look
>> here  http://lists.ops4j.org/pipermail/general/2009q3/002509.html
>> http://lists.ops4j.org/pipermail/general/2009q3/002509.html ). So I got a
>> ClassNotFoundException with org/apache/log4j/Layout.
>>
>> By the way, I saw your activation code afterward, specially
>> env.setProperty("openejb.log.factory",
>> "org.apache.openejb.util.JuliLogStreamFactory");
>>
>> But it didn't work for me.
>> In the org.apache.openejb.util.Logger class, we do
>> System.getProperty("openejb.log.factory") instead of
>> SystemInstance.get().getProperty("openejb.log.factory");
>>
>> I changed some other code to avoid System property usage and now it works
>> (or it should work) if you provide a embedded.juli.properties in the
>> bundle.
>>
>> Another solution is to create a conf/ directory in KARAF_HOME
>> (=OPENEJB_HOME).
>>
>> Anyway, just for fun :) i change the Log4jLogStreamFactory to be able to
>> use
>> Log4j with OSGi and PaxLogging.
>>
>> Jean-Louis
>> --
>> View this message in context:
>> http://www.nabble.com/For-adventurous%3A-first-run-of-OSGified-OpenEJB-*seems*-running-fine-tp26033567p26110134.html
>> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> 
> 

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


Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Guillaume Nodet <gn...@gmail.com>.
Btw, I was going to have a look at the features descriptor but could
not find it in svn ...  Has it been checked in already ?

On Thu, Oct 29, 2009 at 10:56, Jean-Louis MONTEIRO
<je...@atosorigin.com> wrote:
>
>
>> First of all, i went to Felix-Karaf 1.0.0 which is a bit for user friendly
>
> I've been wondering what Karaf was having seen it in use in Geronimo
> osgification. I'm glad you used it so I'm encourage to do so if it
> gets things easier.
>
>
> Jacek Laskowski wrote:
>>
>> Actually, Karaf relies on Felix for its OSGi platform. But it provides a
>> set of useful tools and configuration.
>> Some details are available here
>> http://felix.apache.org/site/apache-felix-karaf.html
>>
>
>> 1. For some strange reasons, installing osgi bundles using Pax mvn url
>> handler didn't run fine (not able to find my proxy settings).
>
> Why did you have to use it at all? Was it as a replacement for
> installing bundles from maven repos using http?
>
>
> Jacek Laskowski wrote:
>>
>> Absolutely!
>> I like the idea to use maven behavior to install bundles.
>> I mean osgi:install mvn:<groupId>/<artifactId>/<version> instead of
>> specifying a repository with an hard coded URL.
>>
>
>
>> 2. I played with information from your mail. It was useful but too heavy.
>
> It will get easier when I (or someone else) prepare appropriate config
> file and the necessary bundles get installed automatically. Anyway,
> I'm all ears to hear how the process can get simpler.
>
>
> Jacek Laskowski wrote:
>>
>> Using features is easier.
>> I changed the openejb-core-osgi module to add features
>> generation/deployment on maven.
>>
>
>> 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.
>
> +1 if it gets the osgification simpler. Having a bundle required is
> just a way to link bundles together and they can get installed by not
> started. Starting a bundle resolves imports so it's not a cyclic
> dependency because only openejb-core has to be started.
>
>
> Jacek Laskowski wrote:
>>
>> I got it working even if i'm not really happy with. IMO, we should review
>> loader stuff.
>> For example, in the Activator, the loader is used to initialize the
>> container whereas OpenEJB.destroy() is directly used to shutdown the
>> container.
>>
>
>> 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 don't understand it yet - it looks karaf-specific which I would
> avoid unless it's required. Could you explain what it is for?
>
>
> Jacek Laskowski wrote:
>>
>> May be the best, is to try it!
>> Basically, a feature is a set of bundles.
>> For example, instead of installing all APIs using something like
>> # install osgi bundles using mvn url handler
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.0.2
>> osgi:install mvn:org.apache.geronimo.specs/geronimo-javamail_1.4_spec/1.6
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1
>> osgi:install mvn:org.apache.geronimo.specs/geronimo-ejb_3.0_spec/1.0.1
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-interceptor_3.0_spec/1.0.1
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0
>> osgi:install
>> mvn:org.apache.geronimo.specs/geronimo-j2ee-deployment_1.1_spec/1.1
>> ...
>>
>> you just need to do a features:install javaee-api.
>>
>>
>
> Regarding logging, i had an issue with our log4j usage.
> On Karaf, Pax Logging is installed be default so you can use the Log4j
> logger in your application, but you cannot use internal APIs (have a look
> here  http://lists.ops4j.org/pipermail/general/2009q3/002509.html
> http://lists.ops4j.org/pipermail/general/2009q3/002509.html ). So I got a
> ClassNotFoundException with org/apache/log4j/Layout.
>
> By the way, I saw your activation code afterward, specially
> env.setProperty("openejb.log.factory",
> "org.apache.openejb.util.JuliLogStreamFactory");
>
> But it didn't work for me.
> In the org.apache.openejb.util.Logger class, we do
> System.getProperty("openejb.log.factory") instead of
> SystemInstance.get().getProperty("openejb.log.factory");
>
> I changed some other code to avoid System property usage and now it works
> (or it should work) if you provide a embedded.juli.properties in the bundle.
>
> Another solution is to create a conf/ directory in KARAF_HOME
> (=OPENEJB_HOME).
>
> Anyway, just for fun :) i change the Log4jLogStreamFactory to be able to use
> Log4j with OSGi and PaxLogging.
>
> Jean-Louis
> --
> View this message in context: http://www.nabble.com/For-adventurous%3A-first-run-of-OSGified-OpenEJB-*seems*-running-fine-tp26033567p26110134.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

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

> First of all, i went to Felix-Karaf 1.0.0 which is a bit for user friendly

I've been wondering what Karaf was having seen it in use in Geronimo
osgification. I'm glad you used it so I'm encourage to do so if it
gets things easier.


Jacek Laskowski wrote:
> 
> Actually, Karaf relies on Felix for its OSGi platform. But it provides a
> set of useful tools and configuration.
> Some details are available here
> http://felix.apache.org/site/apache-felix-karaf.html
> 

> 1. For some strange reasons, installing osgi bundles using Pax mvn url
> handler didn't run fine (not able to find my proxy settings).

Why did you have to use it at all? Was it as a replacement for
installing bundles from maven repos using http?


Jacek Laskowski wrote:
> 
> Absolutely!
> I like the idea to use maven behavior to install bundles.
> I mean osgi:install mvn:<groupId>/<artifactId>/<version> instead of
> specifying a repository with an hard coded URL.
> 


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

It will get easier when I (or someone else) prepare appropriate config
file and the necessary bundles get installed automatically. Anyway,
I'm all ears to hear how the process can get simpler.


Jacek Laskowski wrote:
> 
> Using features is easier.
> I changed the openejb-core-osgi module to add features
> generation/deployment on maven.
> 

> 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.

+1 if it gets the osgification simpler. Having a bundle required is
just a way to link bundles together and they can get installed by not
started. Starting a bundle resolves imports so it's not a cyclic
dependency because only openejb-core has to be started.


Jacek Laskowski wrote:
> 
> I got it working even if i'm not really happy with. IMO, we should review
> loader stuff.
> For example, in the Activator, the loader is used to initialize the
> container whereas OpenEJB.destroy() is directly used to shutdown the
> container.
> 

> 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 don't understand it yet - it looks karaf-specific which I would
avoid unless it's required. Could you explain what it is for?


Jacek Laskowski wrote:
> 
> May be the best, is to try it!
> Basically, a feature is a set of bundles.
> For example, instead of installing all APIs using something like
> # install osgi bundles using mvn url handler
> osgi:install
> mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.0.2
> osgi:install mvn:org.apache.geronimo.specs/geronimo-javamail_1.4_spec/1.6
> osgi:install
> mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1
> osgi:install mvn:org.apache.geronimo.specs/geronimo-ejb_3.0_spec/1.0.1
> osgi:install
> mvn:org.apache.geronimo.specs/geronimo-interceptor_3.0_spec/1.0.1
> osgi:install
> mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0
> osgi:install
> mvn:org.apache.geronimo.specs/geronimo-j2ee-deployment_1.1_spec/1.1
> ...
> 
> you just need to do a features:install javaee-api.
> 
> 

Regarding logging, i had an issue with our log4j usage.
On Karaf, Pax Logging is installed be default so you can use the Log4j
logger in your application, but you cannot use internal APIs (have a look
here  http://lists.ops4j.org/pipermail/general/2009q3/002509.html
http://lists.ops4j.org/pipermail/general/2009q3/002509.html ). So I got a
ClassNotFoundException with org/apache/log4j/Layout.

By the way, I saw your activation code afterward, specially 
env.setProperty("openejb.log.factory",
"org.apache.openejb.util.JuliLogStreamFactory");

But it didn't work for me.
In the org.apache.openejb.util.Logger class, we do
System.getProperty("openejb.log.factory") instead of
SystemInstance.get().getProperty("openejb.log.factory");

I changed some other code to avoid System property usage and now it works
(or it should work) if you provide a embedded.juli.properties in the bundle.

Another solution is to create a conf/ directory in KARAF_HOME
(=OPENEJB_HOME).

Anyway, just for fun :) i change the Log4jLogStreamFactory to be able to use
Log4j with OSGi and PaxLogging.

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


Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Wed, Oct 28, 2009 at 5:38 PM, Jean-Louis MONTEIRO
<je...@atosorigin.com> wrote:

> First of all, i went to Felix-Karaf 1.0.0 which is a bit for user friendly

I've been wondering what Karaf was having seen it in use in Geronimo
osgification. I'm glad you used it so I'm encourage to do so if it
gets things easier.

> 1. For some strange reasons, installing osgi bundles using Pax mvn url
> handler didn't run fine (not able to find my proxy settings).

Why did you have to use it at all? Was it as a replacement for
installing bundles from maven repos using http?

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

It will get easier when I (or someone else) prepare appropriate config
file and the necessary bundles get installed automatically. Anyway,
I'm all ears to hear how the process can get simpler.

> 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.

+1 if it gets the osgification simpler. Having a bundle required is
just a way to link bundles together and they can get installed by not
started. Starting a bundle resolves imports so it's not a cyclic
dependency because only openejb-core has to be started.

> 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 don't understand it yet - it looks karaf-specific which I would
avoid unless it's required. Could you explain what it is for?

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
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.


Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Jacek...

   No worries wasting my time to test and learn a new thing is no way
wasting, I dream to waste all my time like this :D. I am at work now,
I will give a try when I get back home ALLAH willing.

On Wed, Oct 28, 2009 at 2:25 AM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
> On Wed, Oct 28, 2009 at 12:42 AM, Mohammad Nour El-Din
> <no...@gmail.com> wrote:
>
>> -> ERROR: Error starting
>> file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
>> (org.osgi.framework.BundleException: Unresolved constraint in bundle
>> org
>> .apache.geronimo.components.geronimo-transaction [21]: package;
>> (&(package=org.slf4j)(version>=1.4.0)(!(version>=2.0.0))))
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> org.apache.geronimo.components.geronimo-transaction [21]: package;
>> (&(package=org.slf4j)(version>=1.4.0)(!(version>=2.0.0)))
>>        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
>>        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
>>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
>>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>        at java.lang.Thread.run(Thread.java:619)
>
> Doh, I don't know why I missed it in my initial email, but you need to
> install OPS4J Pax Logging - API (1.4) as well. Sorry for wasting your
> time. Do the following in the console of Felix.
>
> install http://repo2.maven.org/maven2/org/ops4j/pax/logging/pax-logging-api/1.4/pax-logging-api-1.4.jar
>
> In such cases where a package is missing, it's more helpful to have
> 'ps' or 'inspect package requirement <id>' output.
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Wed, Oct 28, 2009 at 12:42 AM, Mohammad Nour El-Din
<no...@gmail.com> wrote:

> -> ERROR: Error starting
> file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org
> .apache.geronimo.components.geronimo-transaction [21]: package;
> (&(package=org.slf4j)(version>=1.4.0)(!(version>=2.0.0))))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.geronimo.components.geronimo-transaction [21]: package;
> (&(package=org.slf4j)(version>=1.4.0)(!(version>=2.0.0)))
>        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
>        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>        at java.lang.Thread.run(Thread.java:619)

Doh, I don't know why I missed it in my initial email, but you need to
install OPS4J Pax Logging - API (1.4) as well. Sorry for wasting your
time. Do the following in the console of Felix.

install http://repo2.maven.org/maven2/org/ops4j/pax/logging/pax-logging-api/1.4/pax-logging-api-1.4.jar

In such cases where a package is missing, it's more helpful to have
'ps' or 'inspect package requirement <id>' output.

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hey Jacek...

   I got another error now :

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

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: 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: 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
-> ERROR: Error starting
file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org
.apache.geronimo.components.geronimo-transaction [21]: package;
(&(package=org.slf4j)(version>=1.4.0)(!(version>=2.0.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.geronimo.components.geronimo-transaction [21]: package;
(&(package=org.slf4j)(version>=1.4.0)(!(version>=2.0.0)))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)

I attached the output of the "headers" command too

On Tue, Oct 27, 2009 at 10:44 AM, Mohammad Nour El-Din
<no...@gmail.com> wrote:
> cool, OK I will tonight ALLAH willing.
>
> On Tue, Oct 27, 2009 at 12:01 AM, Jacek Laskowski
> <ja...@laskowski.net.pl> wrote:
>> On Mon, Oct 26, 2009 at 10:44 PM, Mohammad Nour El-Din
>> <no...@gmail.com> wrote:
>>
>>>   I still have the same error showing up
>> ....
>>> -> ERROR: Error starting
>>> file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
>>> (org.osgi.framework.BundleException: Unresolved constraint in bundle
>>> org.apache.openejb.core [6]: package;
>>> (&(package=javax.transaction)(version>=5.0.0)))
>>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>>> org.apache.openejb.core [6]: package;
>>> (&(package=javax.transaction)(version>=5.0.0))
>>>        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
>>>        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
>>>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
>>>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>>        at java.lang.Thread.run(Thread.java:619)
>>
>> After you rebuild the openejb-core bundle project you have to update
>> it in felix. The org.apache.openejb.core has the identifier 6 so you
>> should do as follows:
>>
>> -> update 6
>>
>> If the issue keeps showing up, send 'headers 6' command output. I do
>> 'refresh' sometimes to make felix happy with my current bundle setup.
>> Give it a try too.
>>
>> Jacek
>>
>> --
>> Jacek Laskowski
>> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>>
>
>
>
> --
> Thanks
> - Mohammad Nour
> - LinkedIn: http://www.linkedin.com/in/mnour
> ----
> "Life is like riding a bicycle. To keep your balance you must keep moving"
> - Albert Einstein
>
> "Writing clean code is what you must do in order to call yourself a
> professional. There is no reasonable excuse for doing anything less
> than your best."
> - Clean Code: A Handbook of Agile Software Craftsmanship
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
cool, OK I will tonight ALLAH willing.

On Tue, Oct 27, 2009 at 12:01 AM, Jacek Laskowski
<ja...@laskowski.net.pl> wrote:
> On Mon, Oct 26, 2009 at 10:44 PM, Mohammad Nour El-Din
> <no...@gmail.com> wrote:
>
>>   I still have the same error showing up
> ....
>> -> ERROR: Error starting
>> file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
>> (org.osgi.framework.BundleException: Unresolved constraint in bundle
>> org.apache.openejb.core [6]: package;
>> (&(package=javax.transaction)(version>=5.0.0)))
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> org.apache.openejb.core [6]: package;
>> (&(package=javax.transaction)(version>=5.0.0))
>>        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
>>        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
>>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
>>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>        at java.lang.Thread.run(Thread.java:619)
>
> After you rebuild the openejb-core bundle project you have to update
> it in felix. The org.apache.openejb.core has the identifier 6 so you
> should do as follows:
>
> -> update 6
>
> If the issue keeps showing up, send 'headers 6' command output. I do
> 'refresh' sometimes to make felix happy with my current bundle setup.
> Give it a try too.
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Mon, Oct 26, 2009 at 10:44 PM, Mohammad Nour El-Din
<no...@gmail.com> wrote:

>   I still have the same error showing up
....
> -> ERROR: Error starting
> file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.openejb.core [6]: package;
> (&(package=javax.transaction)(version>=5.0.0)))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.openejb.core [6]: package;
> (&(package=javax.transaction)(version>=5.0.0))
>        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
>        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
>        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
>        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>        at java.lang.Thread.run(Thread.java:619)

After you rebuild the openejb-core bundle project you have to update
it in felix. The org.apache.openejb.core has the identifier 6 so you
should do as follows:

-> update 6

If the issue keeps showing up, send 'headers 6' command output. I do
'refresh' sometimes to make felix happy with my current bundle setup.
Give it a try too.

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Jacek...

   I still have the same error showing up

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
-> ERROR: Error starting
file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org
.apache.openejb.core [6]: package;
(&(package=javax.transaction)(version>=5.0.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.openejb.core [6]: package;
(&(package=javax.transaction)(version>=5.0.0))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)

NOTE: My environment is:

  jdk1.6.0_16
  Windows Vista Home Premium SP1

On Sun, Oct 25, 2009 at 5:35 PM, Mohammad Nour El-Din
<no...@gmail.com> wrote:
> I tried all combinations of commenting the javax.transaction in the
> default.properties file :D. Thanks for the last commit, I will try it
> again this night.
>
> On Sun, Oct 25, 2009 at 4:05 PM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
>> On Sun, Oct 25, 2009 at 2:55 PM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
>>
>>
>>> I can't figure out where the version of javax.transaction came from.
>>
>> I've found it. You suffered from my
>> last-change-before-commit-without-much-testing change committed to the
>> repo :) Commited another change to let you pass it.
>>
>> jlaskowski@work /cygdrive/c/oss/openejb3/container/openejb-core
>> $ svn ci -m 'Fix the version of javax.transaction' pom.xml
>> Sending        pom.xml
>> Transmitting file data .
>> Committed revision 829573.
>>
>> Jacek
>>
>> --
>> Jacek Laskowski
>> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>>
>
>
>
> --
> Thanks
> - Mohammad Nour
> - LinkedIn: http://www.linkedin.com/in/mnour
> ----
> "Life is like riding a bicycle. To keep your balance you must keep moving"
> - Albert Einstein
>
> "Writing clean code is what you must do in order to call yourself a
> professional. There is no reasonable excuse for doing anything less
> than your best."
> - Clean Code: A Handbook of Agile Software Craftsmanship
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
I tried all combinations of commenting the javax.transaction in the
default.properties file :D. Thanks for the last commit, I will try it
again this night.

On Sun, Oct 25, 2009 at 4:05 PM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
> On Sun, Oct 25, 2009 at 2:55 PM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
>
>
>> I can't figure out where the version of javax.transaction came from.
>
> I've found it. You suffered from my
> last-change-before-commit-without-much-testing change committed to the
> repo :) Commited another change to let you pass it.
>
> jlaskowski@work /cygdrive/c/oss/openejb3/container/openejb-core
> $ svn ci -m 'Fix the version of javax.transaction' pom.xml
> Sending        pom.xml
> Transmitting file data .
> Committed revision 829573.
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Sun, Oct 25, 2009 at 2:55 PM, Jacek Laskowski <ja...@laskowski.net.pl> wrote:


> I can't figure out where the version of javax.transaction came from.

I've found it. You suffered from my
last-change-before-commit-without-much-testing change committed to the
repo :) Commited another change to let you pass it.

jlaskowski@work /cygdrive/c/oss/openejb3/container/openejb-core
$ svn ci -m 'Fix the version of javax.transaction' pom.xml
Sending        pom.xml
Transmitting file data .
Committed revision 829573.

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Sun, Oct 25, 2009 at 12:17 PM, Mohammad Nour El-Din
<no...@gmail.com> wrote:
> Hi Jacek...
>
>   Now I started to use Java 6.0 but I got the following error :(.
> Notice that I attached the "default.properties" file I have in my
> "felix.jar"

The attached default.properties doesn't have javax.transaction.xa
commented out. Make sure it is (I'm not sure if it's the root cause,
but just to be on the safe side give it a try).

Execute

inspect package requirement 6

in the felix shell. 6 is the identifier of the Apache OpenEJB ::
Container :: Core (3.1.2.SNAPSHOT) in your case.

Execute

inspect package capability 0

Send both outputs so I can hunt down the issue with enough info. I
can't figure out where the version of javax.transaction came from.

Execute

-> inspect package capability 7
org.apache.geronimo.specs.geronimo-jta_1.1_spec [7] exports packages:
---------------------------------------------------------------------
javax.transaction.xa; version=1.1.0
javax.transaction; version=1.1.0

and send it as well. I'm pretty sure the identifier of the
org.apache.geronimo.specs.geronimo-jta_1.1_spec bundle is different in
the configuration I'm working with.

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Jacek...

   Now I started to use Java 6.0 but I got the following error :(.
Notice that I attached the "default.properties" file I have in my
"felix.jar"


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

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: 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: 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
-> ERROR: Error starting
file:C:\Users\mnour\.m2\repository\org\apache\openejb\openejb-core\3.1.2-SNAPSHOT\openejb-core-3.1.2-SNAPSHOT.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org
.apache.openejb.core [6]: package;
(&(package=javax.transaction)(version>=5.0.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.openejb.core [6]: package;
(&(package=javax.transaction)(version>=5.0.0))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)

On Sun, Oct 25, 2009 at 1:04 AM, Mohammad Nour El-Din
<no...@gmail.com> wrote:
> Thats true, I will try it on Java 6.0 but tomorrow ;) and send ya a feedback too
>
> On Sun, Oct 25, 2009 at 12:58 AM, Jacek Laskowski
> <ja...@laskowski.net.pl> wrote:
>> On Sun, Oct 25, 2009 at 12:47 AM, Mohammad Nour El-Din
>> <no...@gmail.com> wrote:
>>
>>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>>> org.apache.openejb.core [6]: package; (package=javax.jws)
>>
>> I'm running on Java 6 where the javax.jwa is already available.
>> Perhaps you're running on Java 5 or older.
>>
>>> [  27] [Installed  ] [    1] Apache XBean :: ASM shaded (repackaged) (3.6)
>>> [  28] [Installed  ] [    1] Apache XBean :: Finder shaded (repackaged) (3.6)
>>> [  29] [Installed  ] [    1] Apache XBean :: Reflect (3.6)
>>> [  30] [Installed  ] [    1] Apache XBean :: Naming (3.6)
>>
>> I don't remember why, but there's something that made me upgrade XBean
>> to 3.7-SNAPSHOT too.
>>
>> Jacek
>>
>> --
>> Jacek Laskowski
>> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>>
>
>
>
> --
> Thanks
> - Mohammad Nour
> - LinkedIn: http://www.linkedin.com/in/mnour
> ----
> "Life is like riding a bicycle. To keep your balance you must keep moving"
> - Albert Einstein
>
> "Writing clean code is what you must do in order to call yourself a
> professional. There is no reasonable excuse for doing anything less
> than your best."
> - Clean Code: A Handbook of Agile Software Craftsmanship
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Thats true, I will try it on Java 6.0 but tomorrow ;) and send ya a feedback too

On Sun, Oct 25, 2009 at 12:58 AM, Jacek Laskowski
<ja...@laskowski.net.pl> wrote:
> On Sun, Oct 25, 2009 at 12:47 AM, Mohammad Nour El-Din
> <no...@gmail.com> wrote:
>
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> org.apache.openejb.core [6]: package; (package=javax.jws)
>
> I'm running on Java 6 where the javax.jwa is already available.
> Perhaps you're running on Java 5 or older.
>
>> [  27] [Installed  ] [    1] Apache XBean :: ASM shaded (repackaged) (3.6)
>> [  28] [Installed  ] [    1] Apache XBean :: Finder shaded (repackaged) (3.6)
>> [  29] [Installed  ] [    1] Apache XBean :: Reflect (3.6)
>> [  30] [Installed  ] [    1] Apache XBean :: Naming (3.6)
>
> I don't remember why, but there's something that made me upgrade XBean
> to 3.7-SNAPSHOT too.
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Sun, Oct 25, 2009 at 12:47 AM, Mohammad Nour El-Din
<no...@gmail.com> wrote:

> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.openejb.core [6]: package; (package=javax.jws)

I'm running on Java 6 where the javax.jwa is already available.
Perhaps you're running on Java 5 or older.

> [  27] [Installed  ] [    1] Apache XBean :: ASM shaded (repackaged) (3.6)
> [  28] [Installed  ] [    1] Apache XBean :: Finder shaded (repackaged) (3.6)
> [  29] [Installed  ] [    1] Apache XBean :: Reflect (3.6)
> [  30] [Installed  ] [    1] Apache XBean :: Naming (3.6)

I don't remember why, but there's something that made me upgrade XBean
to 3.7-SNAPSHOT too.

Jacek

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

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hey Jacek...

   I tried the steps and after I installed the mentioned bundles I got
this BundleException

org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.openejb.core [6]: package; (package=javax.jws)

my ps execution is

-> 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)
[   6] [Installed  ] [    1] Apache OpenEJB :: Container :: Core
(3.1.2.SNAPSHOT)
[   7] [Installed  ] [    1] geronimo-annotation_1.0_spec (1.1.1)
[   8] [Installed  ] [    1] geronimo-ejb_3.0_spec (1.0.1)
[   9] [Installed  ] [    1] geronimo-jta_1.1_spec (1.1.1)
[  10] [Installed  ] [    1] geronimo-interceptor_3.0_spec (1.0.1)
[  11] [Installed  ] [    1] geronimo-javamail_1.4_spec (1.6)
[  12] [Installed  ] [    1] geronimo-j2ee-management_1.1_spec (1.0.1)
[  13] [Installed  ] [    1] geronimo-jpa_3.0_spec (1.1.1)
[  14] [Installed  ] [    1] geronimo-j2ee-connector_1.5_spec (2.0.0)
[  15] [Installed  ] [    1] J2EE JACC 1.1 (1.0.2)
[  16] [Installed  ] [    1] Apache ServiceMix Bundles: wsdl4j-1.6.1 (1.6.1.1)
[  17] [Installed  ] [    1] pluginName (1.0.0.v20080604-1500)
[  18] [Installed  ] [    1] Apache Jakarta Commons Lang (2.4.0.v20081016-1030)
[  19] [Installed  ] [    1] Apache Commons Logging Plug-in
(1.1.1.v200904062255)
[  20] [Installed  ] [    1] Geronimo TxManager :: Connector (2.1.3)
[  21] [Installed  ] [    1] Geronimo TxManager :: Transaction (2.1.3)
[  22] [Installed  ] [    1] Apache OpenEJB :: Container :: API (3.1.2.SNAPSHOT)
[  23] [Installed  ] [    1] Apache OpenEJB :: Container :: Java Agent
(3.1.2.SNAPSHOT)
[  25] [Installed  ] [    1] Apache OpenEJB :: Container :: Java EE
(3.1.2.SNAPSHOT)
[  26] [Installed  ] [    1] Apache OpenEJB :: Container :: Loader
(3.1.2.SNAPSHOT)
[  27] [Installed  ] [    1] Apache XBean :: ASM shaded (repackaged) (3.6)
[  28] [Installed  ] [    1] Apache XBean :: Finder shaded (repackaged) (3.6)
[  29] [Installed  ] [    1] Apache XBean :: Reflect (3.6)
[  30] [Installed  ] [    1] Apache XBean :: Naming (3.6)
-> start 6
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.openejb.core [6]: package; (package=javax.jws)

Any clues ?

On Sat, Oct 24, 2009 at 10:21 AM, Mohammad Nour El-Din
<no...@gmail.com> wrote:
> Hi Jacek...
>
>   Sounds and looks really cool, I will give it a try today and send a feedback.
>
> On Fri, Oct 23, 2009 at 11:36 PM, Jacek Laskowski
> <ja...@laskowski.net.pl> 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
>>
>
>
>
> --
> Thanks
> - Mohammad Nour
> - LinkedIn: http://www.linkedin.com/in/mnour
> ----
> "Life is like riding a bicycle. To keep your balance you must keep moving"
> - Albert Einstein
>
> "Writing clean code is what you must do in order to call yourself a
> professional. There is no reasonable excuse for doing anything less
> than your best."
> - Clean Code: A Handbook of Agile Software Craftsmanship
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Jacek...

   Sounds and looks really cool, I will give it a try today and send a feedback.

On Fri, Oct 23, 2009 at 11:36 PM, Jacek Laskowski
<ja...@laskowski.net.pl> 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
>



-- 
Thanks
- Mohammad Nour
- LinkedIn: http://www.linkedin.com/in/mnour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

Re: For adventurous: first run of OSGified OpenEJB *seems* running fine

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Awesome!
Good job Jacek!

I'll give it a try on Monday and give you a feedback.

Thanks for that.
I'll be a very nice feature.

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-tp26033567p26037118.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.