You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Aaron Zeckoski <aa...@vt.edu> on 2009/04/24 11:37:22 UTC

Getting the sling home?

I have been searching through the code to try to find a way to get the
sling home but not having much luck. It seems to be stored in the
config properties and loaded via methods like loadConfigProperties but
I can't seem to locate a non-private method that loads these. I was
hoping to find something like String
blah.get(SharedConstants.SLING_HOME).
Thanks for any pointers.
:-)
-AZ

-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

Re: Getting the sling home?

Posted by Carsten Ziegeler <cz...@apache.org>.
Aaron Zeckoski wrote:
> In fact, I only need it as part of the lauchpad (the
> BootstrapInstaller) so maybe it is still fine. It is for this issue:
> https://issues.apache.org/jira/browse/SLING-922
Ah, ok, it should be fine then :)

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Getting the sling home?

Posted by Aaron Zeckoski <aa...@vt.edu>.
In fact, I only need it as part of the lauchpad (the
BootstrapInstaller) so maybe it is still fine. It is for this issue:
https://issues.apache.org/jira/browse/SLING-922
-AZ


On Fri, Apr 24, 2009 at 11:16 AM, Carsten Ziegeler <cz...@apache.org> wrote:
> Aaron Zeckoski wrote:
>> String home = bundleContext.getProperty("sling.home");
>>
> This property is only available when you're using the Sling launchpad.
> Once you deploy Sling into another OSGi container or use a different
> startup method for the container, it's not availabel!
>
> So, maybe there is a better way to solve your problem. If you can tell
> us why you need this property we might come up with a suggestion.
>
> Regards
> Carsten
> --
> Carsten Ziegeler
> cziegeler@apache.org
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

Re: Getting the sling home?

Posted by Carsten Ziegeler <cz...@apache.org>.
Aaron Zeckoski wrote:
> String home = bundleContext.getProperty("sling.home");
> 
This property is only available when you're using the Sling launchpad.
Once you deploy Sling into another OSGi container or use a different
startup method for the container, it's not availabel!

So, maybe there is a better way to solve your problem. If you can tell
us why you need this property we might come up with a suggestion.

Regards
Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Getting the sling home?

Posted by Aaron Zeckoski <aa...@vt.edu>.
String home = bundleContext.getProperty("sling.home");

Excellent! Thanks!
:-)
-AZ

On Fri, Apr 24, 2009 at 10:48 AM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Hi Aaron,
>
> On Fri, Apr 24, 2009 at 11:37 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
>> I have been searching through the code to try to find a way to get the
>> sling home but not having much luck....
>
> See this thread: http://markmail.org/thread/jmxqjwqq5od65qvr
>
> -Bertrand
>


-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

Re: Getting the sling home?

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Aaron,

On Fri, Apr 24, 2009 at 11:37 AM, Aaron Zeckoski <aa...@vt.edu> wrote:
> I have been searching through the code to try to find a way to get the
> sling home but not having much luck....

See this thread: http://markmail.org/thread/jmxqjwqq5od65qvr

-Bertrand