<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Osgi Hibernate Spring-DM Sample</title>
	<atom:link href="http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/feed/" rel="self" type="application/rss+xml" />
	<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/</link>
	<description></description>
	<pubDate>Fri, 30 Jul 2010 11:19:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: loedolff</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-329</link>
		<dc:creator>loedolff</dc:creator>
		<pubDate>Tue, 22 Jun 2010 20:42:28 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-329</guid>
		<description>Miguel,

I think it should be possible to use this example as a starting point.  I'm afraid getting this dynamic behavior to work is ridiculously complex (not simple!), so if you build on top of this example I would make only very minor changes between running a full test suite and checking in the changes.

The version of Hibernate I used is a little dated now, and there may be other persistence frameworks that are better suited for OSGi type development.</description>
		<content:encoded><![CDATA[<p>Miguel,</p>
<p>I think it should be possible to use this example as a starting point.  I&#8217;m afraid getting this dynamic behavior to work is ridiculously complex (not simple!), so if you build on top of this example I would make only very minor changes between running a full test suite and checking in the changes.</p>
<p>The version of Hibernate I used is a little dated now, and there may be other persistence frameworks that are better suited for OSGi type development.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miguel Dominguez</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-328</link>
		<dc:creator>Miguel Dominguez</dc:creator>
		<pubDate>Tue, 22 Jun 2010 09:13:34 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-328</guid>
		<description>Hello loedolff,
Your work here is very interesting. I'm working on a project being developed over Eclipse PDE and we would like to get Hibernate (with this dynamic behavior) as an OSGi service. Is there a simple way to achieve this from your code?
Thanks!</description>
		<content:encoded><![CDATA[<p>Hello loedolff,<br />
Your work here is very interesting. I&#8217;m working on a project being developed over Eclipse PDE and we would like to get Hibernate (with this dynamic behavior) as an OSGi service. Is there a simple way to achieve this from your code?<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: loedolff</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-319</link>
		<dc:creator>loedolff</dc:creator>
		<pubDate>Wed, 24 Feb 2010 19:36:48 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-319</guid>
		<description>Amit,

I think you are right.  The big problem was (as I remember it from almost 2 years ago), to share the same DynamicConfiguration among bundles (all DynamicSessionFactory instances refer to the same instance of DynamicConfiguration). Looking at it again now it seems that the code could just as well have referenced a single DynamicSessionFactory instance.  At the moment I cannot see why that wouldn't work.

-Hans</description>
		<content:encoded><![CDATA[<p>Amit,</p>
<p>I think you are right.  The big problem was (as I remember it from almost 2 years ago), to share the same DynamicConfiguration among bundles (all DynamicSessionFactory instances refer to the same instance of DynamicConfiguration). Looking at it again now it seems that the code could just as well have referenced a single DynamicSessionFactory instance.  At the moment I cannot see why that wouldn&#8217;t work.</p>
<p>-Hans</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Verma</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-318</link>
		<dc:creator>Amit Verma</dc:creator>
		<pubDate>Wed, 24 Feb 2010 10:41:01 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-318</guid>
		<description>Hi loedolff,

While going though the code I found that "com.notehive.osgi.hibernate_samples.session.DynamicSessionFactory" has been configured and instantiated as a bean "dynamicSessionFactory" (through bundle-context.xml files) in hibernate-session and model-a and model-b. Are we creatinging multiple instances of DynamicSessionFactory here?

If yes, could you please explain the use of it as I beleive that we need only one "dynamicSessionFactory" from hibernate-session bundle which will be consumed by other bundles and .

Thanks,
Amit</description>
		<content:encoded><![CDATA[<p>Hi loedolff,</p>
<p>While going though the code I found that &#8220;com.notehive.osgi.hibernate_samples.session.DynamicSessionFactory&#8221; has been configured and instantiated as a bean &#8220;dynamicSessionFactory&#8221; (through bundle-context.xml files) in hibernate-session and model-a and model-b. Are we creatinging multiple instances of DynamicSessionFactory here?</p>
<p>If yes, could you please explain the use of it as I beleive that we need only one &#8220;dynamicSessionFactory&#8221; from hibernate-session bundle which will be consumed by other bundles and .</p>
<p>Thanks,<br />
Amit</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chitra</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-304</link>
		<dc:creator>Chitra</dc:creator>
		<pubDate>Mon, 28 Sep 2009 22:12:32 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-304</guid>
		<description>Hi loedolff,

I'm using your example as base (hibernate_session, model_a projects) and created brand new projects very similar to that. And I also use BND plugin to generate jar files. I am using Spring DM server, I started the server, copied the hibernate_session equivalen project to pickup folder, once I see "Deployed ... completed" message, then I deployed "model_a" equivalent project and I also same "Deployed ... completed" message but I do not see the bundleChanged event fired. I also checked out ss and I could see that both bundles are in ACTIVE state. What might be the problem with this approach ? Could you please help me with this ?</description>
		<content:encoded><![CDATA[<p>Hi loedolff,</p>
<p>I&#8217;m using your example as base (hibernate_session, model_a projects) and created brand new projects very similar to that. And I also use BND plugin to generate jar files. I am using Spring DM server, I started the server, copied the hibernate_session equivalen project to pickup folder, once I see &#8220;Deployed &#8230; completed&#8221; message, then I deployed &#8220;model_a&#8221; equivalent project and I also same &#8220;Deployed &#8230; completed&#8221; message but I do not see the bundleChanged event fired. I also checked out ss and I could see that both bundles are in ACTIVE state. What might be the problem with this approach ? Could you please help me with this ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Selva</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-299</link>
		<dc:creator>Selva</dc:creator>
		<pubDate>Mon, 14 Sep 2009 07:37:33 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-299</guid>
		<description>Code went missing, hence ignore my previous comment.
Mahesh Yamsani,

(I) Bundle Exporting EntityManagerFactory
I have used a singleentitymanager factory and have exported it as an OSGI service

(II) Bundles with Entities, importing EntityManagerFactory
(a) Imported EntityManagerFactory into other bundles using osgi:reference element.
(b) Also set the FragmentHost set to the bundle exporting EntityManagerFactory. The PU bean is otherwise not visible to this bundle.
(c) Note the persistence.xml file need to have the managed class names. At the moment hibernate is not able to scan the enitties in the bundle.
(d) have postProcessPersistenceUnitInfo() overridden in DefaultPersistenceUnitManager to update the managed classes from the old pui. When more then one bundle exports persistence.xml the latest overrides the rest. 

Please let me know if there is better way to set the managed clasess than specifying the persistence.xml.
loedolff your work on this has primarily guided by to reach this far.</description>
		<content:encoded><![CDATA[<p>Code went missing, hence ignore my previous comment.<br />
Mahesh Yamsani,</p>
<p>(I) Bundle Exporting EntityManagerFactory<br />
I have used a singleentitymanager factory and have exported it as an OSGI service</p>
<p>(II) Bundles with Entities, importing EntityManagerFactory<br />
(a) Imported EntityManagerFactory into other bundles using osgi:reference element.<br />
(b) Also set the FragmentHost set to the bundle exporting EntityManagerFactory. The PU bean is otherwise not visible to this bundle.<br />
(c) Note the persistence.xml file need to have the managed class names. At the moment hibernate is not able to scan the enitties in the bundle.<br />
(d) have postProcessPersistenceUnitInfo() overridden in DefaultPersistenceUnitManager to update the managed classes from the old pui. When more then one bundle exports persistence.xml the latest overrides the rest. </p>
<p>Please let me know if there is better way to set the managed clasess than specifying the persistence.xml.<br />
loedolff your work on this has primarily guided by to reach this far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Selva</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-298</link>
		<dc:creator>Selva</dc:creator>
		<pubDate>Mon, 14 Sep 2009 07:23:35 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-298</guid>
		<description>Mahesh Yamsani,
  
 (I) Bundle Exporting EntityManagerFactory
 I have used a singleentitymanager factory and have exported it using 	
	
(II) Bundles with Entities, importing EntityManagerFactory
 (a) Imported EntityManagerFactory into other bundles. 
 (b) Also set the FragmentHost set to the bundle exporting EntityManagerFactory. 
 (c) Note the persistence.xml file need to have the managed class names.
Also have postProcessPersistenceUnitInfo() overridden in DefaultPersistenceUnitManager to update the managed classes from the old pui.

Please let me know if there is better way to set the managed clasess than specifying the persistence.xml.
loedolff your work on this has primarily guided by to reach this far.</description>
		<content:encoded><![CDATA[<p>Mahesh Yamsani,</p>
<p> (I) Bundle Exporting EntityManagerFactory<br />
 I have used a singleentitymanager factory and have exported it using 	</p>
<p>(II) Bundles with Entities, importing EntityManagerFactory<br />
 (a) Imported EntityManagerFactory into other bundles.<br />
 (b) Also set the FragmentHost set to the bundle exporting EntityManagerFactory.<br />
 (c) Note the persistence.xml file need to have the managed class names.<br />
Also have postProcessPersistenceUnitInfo() overridden in DefaultPersistenceUnitManager to update the managed classes from the old pui.</p>
<p>Please let me know if there is better way to set the managed clasess than specifying the persistence.xml.<br />
loedolff your work on this has primarily guided by to reach this far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahesh Yamsani</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-297</link>
		<dc:creator>Mahesh Yamsani</dc:creator>
		<pubDate>Sat, 05 Sep 2009 04:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-297</guid>
		<description>hi loedolff,

I just gone through your post it looks very helpful, here I have Some doubts, first of all I want try out an example using JPA with hibernate.

My scenario is like this, My application built up with many bundles, and each bundle will be a module of my application, so when ever I deploy any bundle , that particular module should be added to the Application, and its corresponding DB table s should be get created in the Application DB. For this I approached like this, In each bundle's Manifest folder I just kept the persistence.xml, and I am using Datasource as an OSGi service, I created an entity manager factory for each bundle in respective bundle (as it has to execute the persistence.xml), here is my problem like,Is it possible to use a singleentitymanger factory to execute the each bundles persistence.xml at the time of deployment of each bundle.</description>
		<content:encoded><![CDATA[<p>hi loedolff,</p>
<p>I just gone through your post it looks very helpful, here I have Some doubts, first of all I want try out an example using JPA with hibernate.</p>
<p>My scenario is like this, My application built up with many bundles, and each bundle will be a module of my application, so when ever I deploy any bundle , that particular module should be added to the Application, and its corresponding DB table s should be get created in the Application DB. For this I approached like this, In each bundle&#8217;s Manifest folder I just kept the persistence.xml, and I am using Datasource as an OSGi service, I created an entity manager factory for each bundle in respective bundle (as it has to execute the persistence.xml), here is my problem like,Is it possible to use a singleentitymanger factory to execute the each bundles persistence.xml at the time of deployment of each bundle.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: loedolff</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-288</link>
		<dc:creator>loedolff</dc:creator>
		<pubDate>Wed, 22 Jul 2009 22:32:09 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-288</guid>
		<description>Christian, the code is hosted at code.google.com, and it shouldn't ask you for a password if you are using http.  It will ask for a password if you use https.  Please see http://code.google.com/p/voluble/source/checkout for more details.</description>
		<content:encoded><![CDATA[<p>Christian, the code is hosted at code.google.com, and it shouldn&#8217;t ask you for a password if you are using http.  It will ask for a password if you use https.  Please see <a href="http://code.google.com/p/voluble/source/checkout" rel="nofollow">http://code.google.com/p/voluble/source/checkout</a> for more details.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: christian</title>
		<link>http://notehive.com/wp/2008/07/23/osgi-hibernate-spring-dm-sample/#comment-287</link>
		<dc:creator>christian</dc:creator>
		<pubDate>Wed, 22 Jul 2009 22:23:10 +0000</pubDate>
		<guid isPermaLink="false">http://notehive.com/wp/?p=53#comment-287</guid>
		<description>Hi loedolff,

I red your article with great interest as I am currently starting a project on Equinox/Spring DM and wish to use JPA with hibernate.
I tried to download the code from SVN, but a username/password is required.
Could you provide me the credentials. Regards, christian.</description>
		<content:encoded><![CDATA[<p>Hi loedolff,</p>
<p>I red your article with great interest as I am currently starting a project on Equinox/Spring DM and wish to use JPA with hibernate.<br />
I tried to download the code from SVN, but a username/password is required.<br />
Could you provide me the credentials. Regards, christian.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
