[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] =?gb18030?b?u9i4tKO6ICBlcXVpbm94IGJ1bmRsZSBha2lu?==?gb18030?q?_to_felix_fileinstall?=

i encoutered  the same problem before.After checked out the code,i found the spilth code in the line of 502(maybe the original code had been modified  somewhere,so the line is not correct maybe,but the code below is right,please check it) in the DirectoryWatcher.java( function process):
 
toRefresh.addAll( uninstalledBundles );
toRefresh.addAll(updatedBundles);
//toRefresh.addAll( installedBundles );
 
please note the code  annotated above.i think it is not right to installedBundles to refresh.This is caused by competitive reasons.
 
------------------
学会滑翔,宁静致远||梦依旧
 


------------------ 原始邮件 ------------------
发件人: "Neil Bartlett"<njbartlett@xxxxxxxxx>;
发送时间: 2012年6月15日(星期五) 晚上9:57
收件人: "Equinox development mailing list"<equinox-dev@xxxxxxxxxxx>;
主题: Re: [equinox-dev] equinox bundle akin to felix fileinstall

I think it's more likely that FileInstall is seeing the file and trying to install it while the external process (whatever that might be) is still writing it to the disk. Short of hooking into the OS filesystem events (which would require platform-specific native code), any Fileinstall-like bundle will have the same problem.

To alleviate this problem, FileInstall has a configurable timer, i.e. it will only look at the file if it stops changing for a period of time. Maybe you just need to increase the length of that timer. Unfortunately I don't recall exactly how to do that.

Regards
Neil

On Fri, Jun 15, 2012 at 2:43 PM, Raymond Auge <raymond.auge@xxxxxxxxxxx> wrote:
On Fri, Jun 15, 2012 at 9:36 AM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:

The closest thing is the dropins support in p2, but that is not a good comparison since felix fileinstall is a small single bundle.  p2 dropins support is just a part of the whole p2 "engine" and requires a fair bit of the p2 "engine" to function.


Yeah, that's too heavy for my needs.
 

I would be curious to know what exceptions you are seeing with felix.fileinstall.  Perhaps it indicates an equinox framework bug we should fix.  Please open a bug against Equinox->Framework if you think it could be.  I would like to make sure the felix.fileinstall works on Equinox.

This the thing. I'm not even sure it's a bug, or simply something in my env that is causing it.

Here is the logged exception:

org.osgi.framework.BundleException: State change in progress for bundle "file:/home/rotty/apache-tomcat-7.0.23-trunk/repositories/osgi/data/framework/lib/web-extender-spi.jar" by thread "fileinstall-/home/rotty/apache-tomcat-7.0.23-trunk/repositories/osgi/data/framework/lib".
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1088)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.suspendBundle(PackageAdminImpl.java:330)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(PackageAdminImpl.java:467)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(PackageAdminImpl.java:251)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(PackageAdminImpl.java:174)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
... 6 more

It seems that the package resolver thread is reacting to the new bundle while the fileinstall thread is still deploying it. I'm not sure who's at fault; fileinstall or equinox (of something else).

--
Raymond Augé  | Senior Software Architect | Liferay, Inc. 

---

8-9 October 2012 | Liferay North America Symposium | liferay.com/northamerica2012

16-17 October 2012 | Liferay Europe Symposium | liferay.com/europe2012

24-25 October 2012 | Liferay Spain Symposium | liferay.com/spain2012



_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev