Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » bundle full path file name
bundle full path file name [message #754405] Wed, 02 November 2011 13:00 Go to next message
malik  is currently offline malik Friend
Messages: 13
Registered: November 2011
Junior Member
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 13:58 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
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 14:03 Go to previous messageGo to next message
malik  is currently offline malik Friend
Messages: 13
Registered: November 2011
Junior Member
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 14:08 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
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 14:16 Go to previous messageGo to next message
malik  is currently offline malik Friend
Messages: 13
Registered: November 2011
Junior Member
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 15:26 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
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 18:19 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
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 08:10 Go to previous messageGo to next message
malik  is currently offline malik Friend
Messages: 13
Registered: November 2011
Junior Member
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 15:22 Go to previous message
Chris Frost is currently offline Chris FrostFriend
Messages: 230
Registered: January 2010
Location: Southampton, England
Senior Member

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


------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
Previous Topic:snaps v.3.0.1 and resource servlet
Next Topic:A bundle could not be resolved
Goto Forum:
  


Current Time: Fri Apr 19 09:27:42 GMT 2024

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

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

Back to the top