Hi Sriraman, Besides solution 3, which should work always with a little "bash" skripting ;) I can only think of an extra bundle that is a Bundle-Extender, this should listen for Bundles being installed containing the hibernate special files like orm.xml or persistence.xml. Instead of further processing those this bundle should kind of "monitor" the incoming bundle containing this, and if it is fully installed call a refresh on the hibernate bundle. That could be a solution.
regards, Achim 2014-08-23 22:11 GMT+02:00 sreeraaman <[email protected]>: > Thanks Achim, > > Your solution worked perfectly. I had to refresh the > hibernate-entitymanager > bundle to get this working without having to restart karaf. > > I have another issue with regard to issuing the bundle:refresh <id>. I did > it locally in my machine. However, if the karaf runs on a different server > as a service, how can I achieve this. > > I could think of three options: > > 1. use jmx to invoke the operation refresh on the mbean > (org.apache.karaf:type=bundle,name=root). I > launched jconsole and tried to invoke the operation refresh manually. > It > looks like the refresh() > operation is overloaded. refresh() & refresh(String). > What should I pass as a string argument? I tried passing the id of the > bundle, the symbolic name of the > bundle etc. However, all resulted in a null pointer exception. I turned > the log to trace and I could see > some logs > > 2. Use jolokia api and then try to invoke the same api. Still I need to go > via the above method. But I still > have no clues as to what to pass for the string argument. > > 3. connect via ssh using jsch and try to execute the commands. This works > well. > > Can you please suggest if there is a better way of achieving this? > > best regards > Sriraman. > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/karaf-jpa-hibernate-error-updating-bundles-via-feature-uninstall-feature-install-tp4034887p4034890.html > Sent from the Karaf - User mailing list archive at Nabble.com. > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Software Architect / Project Manager / Scrum Master
