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 4.0 M2 and OSGi classloading issue
Date Mon, 27 Apr 2015 07:47:19 GMT
> Maybe I'm using the wrong factory?

"Import-Package" in cayenne-server MANIFEST.MF has this:

  org.apache.commons.dbcp;resolution:=optional

So Cayenne does not know anything about DBCP2, only DBCP.

And I guess there's a bigger design problem with the way Cayenne currently obtains a DataSource
in OSGi environment. I'd rather a DataSource is started as its own bundle, and Cayenne would
simply use that somehow instead of trying to instantiate it. Not being an OSGi user, I don't
have an immediate solution in my head. But if somebody has an insight on DataSource management,
will be happy to discuss.

Andrus


> On Apr 22, 2015, at 2:27 PM, mporru <matteo.porru@abodata.com> wrote:
> 
> I'm glad Aristedes confirmed java 8 support! 
> 
> About dbcp.. well I use to install it as a bundle, start it, so it is
> available to Cayenne.
> I mean: 
> osgi> ss
> id	State       Bundle
> 0	ACTIVE      org.eclipse.osgi_3.10.2.v20150203-1939
> 1	ACTIVE      org.eclipse.equinox.app_1.3.200.v20130910-1609
> 2	ACTIVE      javax.xml_1.3.4.v201005080400
> 3	ACTIVE      MySQLJDBCDriver_1.0.0
> 4	ACTIVE      jcl.over.slf4j_1.7.5
> 5	ACTIVE      slf4j.api_1.7.5
> 	            Fragments=13
> 6	ACTIVE      org.eclipse.equinox.common_3.6.200.v20130402-1505
> 7	ACTIVE      org.eclipse.osgi.services_3.4.0.v20140312-2051
> 8	ACTIVE      org.apache.commons.collections_3.2.1
> 9	ACTIVE      Cayenne-4.0-Dependencies_4.0.0.M2
> 10	ACTIVE      org.eclipse.equinox.preferences_3.5.200.v20140224-1527
> 11	ACTIVE      org.eclipse.equinox.console_1.1.0.v20140131-1639
> 12	ACTIVE      org.apache.felix.gogo.command_0.10.0.v201209301215
> 13	RESOLVED    slf4j.simple_1.7.5
> 	            Master=5
> 14	ACTIVE      org.apache.cayenne.di_4.0.0.M2
> 15	ACTIVE      org.eclipse.equinox.util_1.0.500.v20130404-1337
> 16	RESOLVED    PacketDB-CayenneConfig_3.1.0
> 	            Master=17
> 17	ACTIVE      org.apache.cayenne.server_4.0.0.M2
> 	            Fragments=16
> 18	ACTIVE      org.apache.commons.pool2_2.3.0
> 19	ACTIVE      org.apache.servicemix.bundles.velocity_1.7.0.6
> 20	ACTIVE      jaxb-api_2.2.12
> 21	ACTIVE      org.apache.commons.lang_2.4.0
> 22	RESOLVED    test-cayenne_1.0.0.0
> 23	ACTIVE      *org.apache.commons.dbcp2*_2.1.0
> 24	ACTIVE      org.apache.felix.gogo.runtime_0.10.0.v201209301036
> 25	ACTIVE      org.apache.felix.gogo.shell_0.10.0.v201212101605
> 26	ACTIVE      org.eclipse.equinox.registry_3.5.400.v20140428-1507
> 27	ACTIVE      org.eclipse.equinox.ds_1.4.200.v20131126-2331
> osgi> 
> 
> But, as I was mentioning above this will provide the classes under the
> package org.apache.commons.dbcp2.XXX
> 
> On Cayenne side this is what I have:
> <?xml version="1.0" encoding="utf-8"?>
> <domain project-version="6">
> 	<map name="PacketMap"/>
> 	<node name="PacketNode"
> 		 factory="org.apache.cayenne.configuration.server.DBCPDataSourceFactory"
> 		 parameters="dbcpPacketDB.properties" >
>  		<map-ref name="PacketMap"/>
> 	</node>
> </domain>
> 
> Maybe I'm using the wrong factory?
> Thanks,
> Matteo
> 
> 
> 
> 
> --
> View this message in context: http://cayenne.195.n3.nabble.com/Cayenne-4-0-M2-and-OSGi-classloading-issue-tp4026812p4026817.html
> Sent from the Cayenne - Dev mailing list archive at Nabble.com.
> 


Mime
View raw message