Skip to main content



      Home
Home » Eclipse Projects » Virgo » bundle full path file name
bundle full path file name [message #754405] Wed, 02 November 2011 09:00 Go to next message
Eclipse UserFriend
Hi.

I have some problem to locate bundle full path file name at run time,
after im diplomat bundle im try to get his full path file name with bundle.getLocation

but i get this path

"org.eclipse.virgo.region.user@file:/home/user1/virgo-web-server/work/org.eclipse.virgo.kernel.deployer_3.0.1.RELEASE/staging/global/bundle/bundlename/2.1.1/bundlename-2.1-M1.jar/"

is there a way to get the real path(from pickup)?

"/home/user1/virgo-web-server/pickup/bundlename-2.1-M1.jar/"

or at least only the bundle full file name:

"/home/user1/virgo-web-server/work/org.eclipse.virgo.kernel.deployer_3.0.1.RELEASE/staging/global/bundle/bundlename/2.1.1/bundlename-2.1-M1.jar/"

Re: bundle full path file name [message #754418 is a reply to message #754405] Wed, 02 November 2011 09:58 Go to previous messageGo to next message
Eclipse UserFriend
Virgo will copy any bundle from pickup to a work directory and deploy it from there.

Any specific reason why you need to have a path to the bundle in /pickup?

Regards,
Dmitry
Re: bundle full path file name [message #754421 is a reply to message #754418] Wed, 02 November 2011 10:03 Go to previous messageGo to next message
Eclipse UserFriend
Hi agine.

the reason is if the user want to remove bundle
i want to remove it from the pickup directory
and for that i need the path.
Re: bundle full path file name [message #754425 is a reply to message #754421] Wed, 02 November 2011 10:08 Go to previous messageGo to next message
Eclipse UserFriend
You could just make use of Virgo Deployer API and undeploy the bundle from that API that will automatically delete it from pickup.

http://virgo-opengrok.springsource.org/xref/virgo/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/ApplicationDeployer.java
Re: bundle full path file name [message #754434 is a reply to message #754425] Wed, 02 November 2011 10:16 Go to previous messageGo to next message
Eclipse UserFriend
I have seen this service but I dont know how I can reference it from my code.
I am using maven and I dont know what dependency I should add to my pom in order to use the virgo services.
Re: bundle full path file name [message #754461 is a reply to message #754434] Wed, 02 November 2011 11:26 Go to previous messageGo to next message
Eclipse UserFriend
You will need to add this repository:

http://build.eclipse.org/rt/virgo/maven/bundles/release/

And this artifact:
groupId:artifactId:version
org.eclipse.virgo.kernel:org.eclipse.virgo.kernel.deployer:3.0.1.RELEASE

Look up service is something like this:

ServiceReference<ApplicationDeployer> appDeployerServiceReference = this.bundleContext.getServiceReference(ApplicationDeployer.class);
this.deployer = (ApplicationDeployer) this.context.getService(appDeployerServiceReference);
Re: bundle full path file name [message #754494 is a reply to message #754461] Wed, 02 November 2011 14:19 Go to previous messageGo to next message
Eclipse UserFriend
Note that the service can also be accessed via the Deployer mxbean if that's easier.
Re: bundle full path file name [message #754547 is a reply to message #754461] Thu, 03 November 2011 04:10 Go to previous messageGo to next message
Eclipse UserFriend
I am getting these errors from maven:

11/3/11 10:08:08 AM IST: Missing artifact org.eclipse.virgo.util:org.eclipse.virgo.util.common:jar:3.0.1.RELEASE:compile
11/3/11 10:08:08 AM IST: Missing artifact org.eclipse.virgo.util:org.eclipse.virgo.util.io:jar:3.0.1.RELEASE:compile
11/3/11 10:08:08 AM IST: Missing artifact org.eclipse.virgo.util:org.eclipse.virgo.util.math:jar:3.0.1.RELEASE:compile
11/3/11 10:08:08 AM IST: Missing artifact org.eclipse.virgo.util:org.eclipse.virgo.util.osgi:jar:3.0.1.RELEASE:compile
11/3/11 10:08:08 AM IST: Missing artifact org.eclipse.virgo.medic:org.eclipse.virgo.medic.core:jar:3.0.1.RELEASE:runtime
11/3/11 10:08:08 AM IST: Missing artifact org.eclipse.virgo.repository:org.eclipse.virgo.repository:jar:3.0.1.RELEASE:compile
11/3/11 10:08:08 AM IST: Missing artifact org.eclipse.virgo.osgi:org.eclipse.virgo.osgi.extensions.equinox:jar:3.0.1.RELEASE:compile
11/3/11 10:08:08 AM IST: Missing artifact org.eclipse.virgo.util:org.eclipse.virgo.util.parser.manifest:jar:3.0.1.RELEASE:compile
11/3/11 10:08:08 AM IST: Missing artifact org.eclipse.virgo.osgi:org.eclipse.virgo.osgi.launcher:jar:3.0.1.RELEASE:compile

Am I missing a repositroy ?
Re: bundle full path file name [message #755162 is a reply to message #754547] Mon, 07 November 2011 10:22 Go to previous message
Eclipse UserFriend
Hi,

You are not missing a repo, the problem was our end. This should be fixed now so please try again and let us know if your still having problems resolving from Maven.

Chris
Previous Topic:snaps v.3.0.1 and resource servlet
Next Topic:A bundle could not be resolved
Goto Forum:
  


Current Time: Wed Jul 16 13:03:58 EDT 2025

Powered by FUDForum. Page generated in 0.10248 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top