You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Gareth <ga...@gmail.com> on 2011/07/28 05:12:45 UTC

Using Spring DM For New Software?

Hello,

In a earlier question today I mentioned that when I tried to use Spring
security in OSGi,
I had to include all the Spring + spring security jars in my wab, which was
not ideal.

I found out what the problem was. I had to include Spring DM web to be able
to remove the jars. The following was added to my web.xml:

	<context-param>
		<param-name>contextClass</param-name>
		<param-value>
		
org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
		</param-value>
	</context-param>

Since this is new code, I was a little uncomfortable adding a dependency on
something which was essentially "EOL" so I had a look to see if I could do
the same with Blueprint (as we are already planning to use blueprint for
other non-web bundles).

Unfortunately the Spring DM web functionality doesn't appear to be covered
in the Blueprint spec (and I don't see anything currently in Aries).

So my question is - is there another method for including Spring in a wab?
If not and I continue with Karaf, what is the recommended approach going
forward? Continue using Spring DM web for the foreseeable future? Avoid
creating dependencies on Spring DM web and include the Spring jars in every
wab? Any other options in the pipeline (will Aries eventually have a similar
feature, or would a replacement come as part of PAX Web?)?

Any suggestions/info/guidance would be much appreciated.

thanks in advance,
Gareth





--
View this message in context: http://karaf.922171.n3.nabble.com/Using-Spring-DM-For-New-Software-tp3205466p3205466.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Using Spring DM For New Software?

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Gareth,

again I'll just do a quick answer :-)

See inline below

regards, Achim

2011/7/28 Gareth <ga...@gmail.com>:
> Hello,
>
> In a earlier question today I mentioned that when I tried to use Spring
> security in OSGi,
> I had to include all the Spring + spring security jars in my wab, which was
> not ideal.
>
> I found out what the problem was. I had to include Spring DM web to be able
> to remove the jars. The following was added to my web.xml:
>
>        <context-param>
>                <param-name>contextClass</param-name>
>                <param-value>
>
> org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
>                </param-value>
>        </context-param>
>

This is actually needed to run stuff in a Spring-DM environment
together with web,
also on Virgo I think.
In the Spring DM Server you even need to set a Spring-DM Server
specifik one, so yes you
are kind of tied to this then.

> Since this is new code, I was a little uncomfortable adding a dependency on
> something which was essentially "EOL" so I had a look to see if I could do
> the same with Blueprint (as we are already planning to use blueprint for
> other non-web bundles).
>

I wouldn't say that Spring-DM is EOL :-)
ask someone of springsource about that ;)

> Unfortunately the Spring DM web functionality doesn't appear to be covered
> in the Blueprint spec (and I don't see anything currently in Aries).
>

To my knowledge no it's not covered right now. I'd guess you could ask
the mailing-list or open an issue for that ;)

> So my question is - is there another method for including Spring in a wab?
> If not and I continue with Karaf, what is the recommended approach going
> forward? Continue using Spring DM web for the foreseeable future? Avoid
> creating dependencies on Spring DM web and include the Spring jars in every
> wab? Any other options in the pipeline (will Aries eventually have a similar
> feature, or would a replacement come as part of PAX Web?)?
>

Just a general suggestion.
You might think of doing the following:

Do a lightweight frontend using Spring-DM-Web and connecting to your
Services via Spring-DM
Publish your Services using Blueprint, this way your only dependency
would be the Frontend.
Later on you might do a redesign of your frontend, e.g. Wicket (using
Pax Wicket ;) )

Hope that helps :-)

> Any suggestions/info/guidance would be much appreciated.
>
> thanks in advance,
> Gareth
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Using-Spring-DM-For-New-Software-tp3205466p3205466.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
--
*Achim Nierbeck*


Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
blog <http://notizblog.nierbeck.de/>