cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Cayenne under OSGi
Date Wed, 20 Nov 2013 18:57:08 GMT
After today’s round of changes (CAY-1886), I am able to start Cayenne bundles in an OSGi
container (Felix). Here are the prerequisites (shown as “install” commands inside the
Felix container). As you see we can’t use some of the direct dependencies of Cayenne, specifically
commons-logging and velocity, in an OSGi container. However there are suitable replacements
out there:

install file:/Users/cayenne/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
install file:/Users/cayenne/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.5/jcl-over-slf4j-1.7.5.jar
install file:/Users/cayenne/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar
install file:/Users/cayenne/.m2/repository/org/slf4j/slf4j-simple/1.7.5/slf4j-simple-1.7.5.jar
install file:/Users/cayenne/.m2/repository//org/apache/servicemix/bundles/org.apache.servicemix.bundles.velocity/1.7_6/org.apache.servicemix.bundles.velocity-1.7_6.jar
install file:/Users/cayenne/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar

... now finally install 2 Cayenne bundles ...

install file:/Users/cayenne/work/cayenne/cayenne-di/target/cayenne-di-3.2.M2-SNAPSHOT.jar
install file:/Users/cayenne/work/cayenne/cayenne-server/target/cayenne-server-3.2.M2-SNAPSHOT.jar

after that cayenne-server can be started, and I end up with the following container state:

g! lb
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (4.2.1)
    1|Active     |    1|Apache Felix Bundle Repository (1.6.6)
    2|Active     |    1|Apache Felix Gogo Command (0.12.0)
    3|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
    4|Active     |    1|Apache Felix Gogo Shell (0.10.0)
   16|Resolved   |    1|Commons Collections (3.2.1)
   23|Resolved   |    1|jcl-over-slf4j (1.7.5)
   24|Resolved   |    1|slf4j-api (1.7.5)
   25|Resolved   |    1|slf4j-simple (1.7.5)
   27|Resolved   |    1|Cayenne Dependency Injection Container (3.2.0.M2-SNAPSHOT)
   31|Resolved   |    1|Apache ServiceMix :: Bundles :: velocity (1.7.0.6)
   32|Active     |    1|Cayenne Server (3.2.0.M2-SNAPSHOT)
   35|Resolved   |    1|Commons Lang (2.4.0)

Next step is to write a bundle that uses Cayenne and see what we need to do with the ClassLoader.

A.


Mime
View raw message