You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by tung vu duc <tu...@yahoo.com> on 2008/09/06 00:55:32 UTC

is there any way to user sling whithout OSGi

Hi cool Day Software developers,

With sling-lauchpad i have learn the first lessions about sling. i understand the concept of sling, how it ease the working with JCR.
But my question is now: how to use sling whithout OSGi (without Felix). Only request processing, script selection and scripting engine suffice for most
web apps. I think, the most developers, who would like to use sling, will integrate it into their own web app but do't use sling alone, whithout a server-side web framwork. For a normal web app is sling with Felix too heavy and complex.

To sum up all what i want to know:

- is there a version of sling-lauchpad without Felix?

and a tep better

- is there a version of sling-lauchpad whithout Felix and can be configured whit a existing repository. (dont use the buildin repository)


Thanks you all very much!



      

Re: is there any way to user sling whithout OSGi

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Bertrand Delacretaz schrieb:
> On Sat, Sep 6, 2008 at 9:40 AM, Torgeir Veimo <to...@pobox.com> wrote:
>> On 6 Sep 2008, at 16:19, Bertrand Delacretaz wrote:
>>
>>> Replacing the jacrkabbit-server bundle by the jackrabbit-client one,
>>> and configuring that with the repository access parameters, should be
>>> enough for that.
>> Does that imply RMI?
> 
> Yes, both RMI and JNDI are supported. If the repository name starts
> with "rmi://", RMI is tried, otherwise it's assumed to be a JNDI name.

This should read "No, both RMI and JNDI are supported. ...." ;-)

Regards
Felix


> 
> Details can be found in the RepositoryAccessor class, getRepository()
> method [1].
> 
> -Bertrand
> 
> [1] http://svn.eu.apache.org/repos/asf/incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/util/RepositoryAccessor.java
> 

Re: is there any way to user sling whithout OSGi

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Sat, Sep 6, 2008 at 9:40 AM, Torgeir Veimo <to...@pobox.com> wrote:
>
> On 6 Sep 2008, at 16:19, Bertrand Delacretaz wrote:
>
>> Replacing the jacrkabbit-server bundle by the jackrabbit-client one,
>> and configuring that with the repository access parameters, should be
>> enough for that.
>
> Does that imply RMI?

Yes, both RMI and JNDI are supported. If the repository name starts
with "rmi://", RMI is tried, otherwise it's assumed to be a JNDI name.

Details can be found in the RepositoryAccessor class, getRepository()
method [1].

-Bertrand

[1] http://svn.eu.apache.org/repos/asf/incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/util/RepositoryAccessor.java

Re: is there any way to user sling whithout OSGi

Posted by Torgeir Veimo <to...@pobox.com>.
On 6 Sep 2008, at 16:19, Bertrand Delacretaz wrote:

> Replacing the jacrkabbit-server bundle by the jackrabbit-client one,
> and configuring that with the repository access parameters, should be
> enough for that.


Does that imply RMI?

-- 
Torgeir Veimo
torgeir@pobox.com





Re: is there any way to user sling whithout OSGi

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

On Sat, Sep 6, 2008 at 2:24 AM, Torgeir Veimo <to...@pobox.com> wrote:
> On 6 Sep 2008, at 08:55, tung vu duc wrote:

>>... how to use sling whithout OSGi (without Felix).
>
> This will be hard. I'd figure it would be easier to leave felix in, it's not
> too large...

Sure, and I don't think the Sling community is willing to support
non-OSGi setups at this time. We like it too much ;-)

Reusing specific parts of Sling outside of the OSGi world, however, is
certainly possible. But in general, you need OSGi to use Sling, and
that's where our focus is, as a community.

>> ...I think, the most developers, who would like to use sling, will integrate
>> it into their own web app but do't use sling alone, whithout a server-side
>> web framwork. For a normal web app is sling with Felix too heavy and
>> complex....

Depends on what a "normal" webapp is. Lots of Sling use cases don't
require any OSGi knowledge, you can go a long way just with scripting
in the repository. What kind of server-side web framework would you
use with Sling? You don't need any, unless I misunderstand the term.

And quite frankly, creating pluggable Sling servlets or components is
not that hard using the supplied Maven plugins. And there are other
ways that are not hard if you don't want to use Maven.

> ...Secondly, sling can be set up to use an existing repository, there was some
> hints provided on the mailing list, but I don't remember the subject lines.
> Searching the mailing list should give some pointers....

Replacing the jacrkabbit-server bundle by the jackrabbit-client one,
and configuring that with the repository access parameters, should be
enough for that.

-Bertrand

Re: is there any way to user sling whithout OSGi

Posted by Torgeir Veimo <to...@pobox.com>.
On 6 Sep 2008, at 08:55, tung vu duc wrote:

> Hi cool Day Software developers,

Am answering as a mere user, not related to Day..

> how to use sling whithout OSGi (without Felix).

This will be hard. I'd figure it would be easier to leave felix in,  
it's not too large.

> I think, the most developers, who would like to use sling, will  
> integrate it into their own web app but do't use sling alone,  
> whithout a server-side web framwork. For a normal web app is sling  
> with Felix too heavy and complex.

It's certainly possible to integrate into an existing webapp. You can  
extract the guts of the war file and embed into yours. The issue I  
think it to get a resource provider set up that can serve resources  
from the webapp, in addition to the sling repository, this would allow  
JSP files to reside in their usual places in your legacy applications  
WAR file.

A file system resource provider has already been implemented and is in  
the samples directory of the sling source. I believe this can be  
modified to use the servlet context getResource() method instead of  
using the filesystem directly. Search the mailing list for SLING-583  
to see some discussion on this topic and how to set up.

Secondly, sling can be set up to use an existing repository, there was  
some hints provided on the mailing list, but I don't remember the  
subject lines. Searching the mailing list should give some pointers.

-- 
Torgeir Veimo
torgeir@pobox.com