You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Brad Beck <BB...@peoplenetonline.com> on 2010/11/11 17:08:36 UTC

Deploying plain spring-dm config file...

Is there any support for deploying a plain spring-dm configuration file using osgi:install or as part of a feature xml? Appears the spring deployer currently supports dropping plain configuration files in the deploy directory. I'd like to be able to do this as part of a feature xml.

-Brad


RE: Deploying plain spring-dm config file...

Posted by Brad Beck <BB...@peoplenetonline.com>.
When I drop the following in the deploy directory, it publishes the sessionFactory service just fine. But when I deploy it using "install -s spring:mvn:org.example/session.factory/1.0-SNAPSHOT/xml", the spring service shows as "Started" when I do a "list", but the sessionFactory service doesn't get published.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:osgi="http://www.springframework.org/schema/osgi" 
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
    http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
    ">
    
    <osgi:reference id="dataSource" interface="javax.sql.DataSource"
        filter="(osgi.jndi.service.name=jdbc/foo)" />

    <bean id="sessionFactory"
        class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
                <prop key="hibernate.cache.use_second_level_cache">false</prop>
            </props>
        </property>
    </bean>

    <osgi:service interface="org.hibernate.SessionFactory" ref="sessionFactory"/>
</beans>

-----Original Message-----
From: Guillaume Nodet [mailto:gnodet@gmail.com] 
Sent: Thursday, November 11, 2010 10:58 AM
To: user@karaf.apache.org
Subject: Re: Deploying plain spring-dm config file...

Just use spring:xxx where xxx is any valid url (using file, http or mvn) ...

On Thu, Nov 11, 2010 at 17:08, Brad Beck <BB...@peoplenetonline.com> wrote:
> Is there any support for deploying a plain spring-dm configuration file
> using osgi:install or as part of a feature xml? Appears the spring deployer
> currently supports dropping plain configuration files in the deploy
> directory. I'd like to be able to do this as part of a feature xml.
>
>
>
> -Brad
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Deploying plain spring-dm config file...

Posted by Guillaume Nodet <gn...@gmail.com>.
Just use spring:xxx where xxx is any valid url (using file, http or mvn) ...

On Thu, Nov 11, 2010 at 17:08, Brad Beck <BB...@peoplenetonline.com> wrote:
> Is there any support for deploying a plain spring-dm configuration file
> using osgi:install or as part of a feature xml? Appears the spring deployer
> currently supports dropping plain configuration files in the deploy
> directory. I’d like to be able to do this as part of a feature xml.
>
>
>
> -Brad
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com