Home » Eclipse Projects » Virgo » exporting services via spring configuration not working
| | | | |
Re: exporting services via spring configuration not working [message #1006562 is a reply to message #1005760] |
Thu, 31 January 2013 18:12 |
Eduardo Frazão Messages: 123 Registered: January 2012 |
Senior Member |
|
|
This tag means to have an ">" at the end of auto export.
<osgi:service id="epiDaoOSGIService" ref="myDriver"
interface="com.nnnnnn.msp.my_service.dao.MyDriver" auto-export="interfaces" >
</osgi:service>
Could try to change for that:
<osgi:service id="epiDaoOSGIService" ref="myDriver" interface="com.nnnnnn.msp.my_service.dao.MyDriver" />
As you are already declaring the implemented service interface, you do not need to declare the autoexport.
Do you use the osgi xml namespace?
This is a context config of a bundle here, that is working as expected:
<?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:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"
default-init-method="init">
<bean id="i18NServiceImpl" class="br.com.autmix.shared.spi.impl.i18n.I18NServiceImpl" />
<osgi:service ref="i18NServiceImpl" interface="br.com.autmix.shared.spi.i18n.I18NService" />
</beans>
[Updated on: Thu, 31 January 2013 18:16] Report message to a moderator
|
|
| | | | |
Re: exporting services via spring configuration not working [message #1021694 is a reply to message #1007676] |
Wed, 20 March 2013 14:27 |
James Gartner Messages: 30 Registered: March 2012 |
Member |
|
|
Sorry for this VERY late reply (I was pulled into another project for the past month and had no time for this).
HERE is the part of the config.xml:
<?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:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"
default-init-method="init">
.....
<bean id="epiDriver" class="com.moodys.msp.epi_service.dao.EpiDriverImpl">
<property name="documentTypeMapping" ref="documentTypeMapping" />
</bean>
.....
<osgi:service ref="epiDriver" interface="com.moodys.msp.epi_service.dao.EpiDriver" />
HERE is the manifest for the bundle:
Manifest-Version: 1.0
Bnd-LastModified: 1359659639062
Build-Jdk: 1.6.0_31
Built-By: gartnerj
Bundle-ClassPath: .,slf4j-log4j12-1.6.1.jar,slf4j-api-1.6.1.jar
Bundle-ManifestVersion: 2
Bundle-Name: EPI DAO - IMPL
Bundle-SymbolicName: com.moodys.msp.epi_service-dao-jdbc-impl
Bundle-Vendor: Moody's
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Embed-Dependency: *;scope=compile|runtime;inline=false
Embed-Transitive: false
Embedded-Artifacts: slf4j-log4j12-1.6.1.jar;g="org.slf4j";a="slf4j-log4j
12";v="1.6.1",slf4j-api-1.6.1.jar;g="org.slf4j";a="slf4j-api";v="1.6.1"
Export-Package: com.moodys.msp.epi_service.dao;uses:="com.moodys.msp.epi
_service.exception,org.springframework.beans.factory.annotation,com.moo
dys.msp.epi_service.util.dao";version="1.0.0.SNAPSHOT",com.moodys.msp.e
pi_service.dataobject;uses:="com.moodys.msp.epi_service.dao,com.moodys.
msp.epi_service.util.dao,com.moodys.msp.epi_service.exception,org.sprin
gframework.jdbc.core,com.moodys.msp.epi_service.util,org.springframewor
k.dao";version="1.0.0.SNAPSHOT"
Import-Package: com.moodys.msp.epi_service.dao;version="[1.0,2)",com.moo
dys.msp.epi_service.exception;version="[1.0,2)",com.moodys.msp.epi_serv
ice.util;version="[1.0,2)",com.moodys.msp.epi_service.util.dao;version=
"[1.0,2)",com.sybase.jdbc3.jdbc;version="[6.0,7)",org.apache.commons.db
cp;version="[1.2,2)",org.apache.log4j,org.springframework.beans.factory
.annotation;version="[3.0,4)",org.springframework.dao;version="[3.0,4)"
,org.springframework.jdbc.core;version="[3.0,4)",org.springframework.jd
bc.datasource;version="[3.0,4)"
Tool: Bnd-1.50.0
The bundles are ACTIVE, everything in the log appears to be fine here is the log from when I STARTED the bundle:
Bundle com.moodys.msp.epi_service-dao-jdbc-impl_1.0.0.SNAPSHOT, BundleEvent STARTED
Started bundle 'com.moodys.msp.epi_service-dao-jdbc-impl' version '1.0.0.SNAPSHOT'.
Nothing fails until I try to use the original service which uses this dao bundle.
|
|
|
Goto Forum:
Current Time: Fri Apr 19 06:40:48 GMT 2024
Powered by FUDForum. Page generated in 0.02942 seconds
|