Hello Jeremy,

Your work seems very interesting! I wanted to comment that the Service
Binder development is currently stopped. The reason for this is that the
Service Binder has accomplished its mission as it has strongly
influenced a new section of the OSGi R4 spec which is called Declarative
Services Specification. This section is already in the publicly
available draft for R4. Declarative Services will thus become the
"official" version of the Service Binder.

As of this moment there is no open-source implementation to the
Declarative Services spec. I am considering on taking the Service
Binder's code to create an initial implementation of it, as the
Declarative Services spec is pretty close to the original Service
Binder. However, at this moment there are some issues that need to be
solved before this can become a reality.

My comment would be that you may want to check out the Declarative
Services spec to see if your proposal will be compatible with it. In
particular you may consider the new XML format that is proposed in the
Declarative Services spec which has some differences to the Service
Binder's.

Now the question would be... Should the spring's XML be turned into the
(now standard) component descriptor or vice-versa as you did?

Best regards,

Humberto



On Thu, 2005-09-29 at 16:03, Jeremy Volkman wrote:
> Hi all,
> 
> I've been playing around with Service Binder
> (http://gravity.sourceforge.net/servicebinder/) for the past week or
> so (thanks Richard and Humberto!).  My team is strongly considering
> OSGi as the base of a re-implementation of one of our enterprise
> systems here, currently based on Spring
> (http://www.springframework.org).  Since we all know and love Spring,
> I wanted to see if I could work it into OSGi somehow.
> 
> I've modified the latest ServiceBinder implementation to load its
> service instances from a Spring BeanFactory, instead of trying to
> dynamically instantiate the classes itself.  I also got rid of the
> standalone ServiceBinder XML file and integrated ServiceBinder
> definitions directly into the Spring XML files.  Now services might be
> defined like this:
> 
> ==========================================================
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "binder-beans.dtd">
> 
> <beans>
>     <bean id="hibernateServiceImpl" singleton="false"
>         class="test.orm.hibernate.impl.HibernateServiceImpl">
> 
>         <instance>
>             <provides interface="test.orm.hibernate.HibernateService"/>
>             <osgiproperty name="version" value="1" type="string"/>
>             <desires
>                 service="test.service.ServiceProvider"
>                 filter="(version=*)"
>                 cardinality="0..1"
>                 policy="dynamic"
>                 bind-method="setService"
>                 unbind-method="unsetService"
>             />
>         </instance>
>               
>         <property name="dataSource"><ref 
> bean="hibernateDataSource"/></property>
>         <property name="properties">
>             <props>
>                 <prop
> key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
>                 <prop key="hibernate.jdbc.batch_size">0</prop>
>                 <prop key="hibernate.show_sql">true</prop>
>             </props>
>         </property>
> 
>     </bean>
> 
>     <bean id="hibernateDataSource"
> class="org.apache.commons.dbcp.BasicDataSource">
>         ...
>     </bean>
> </beans>
> 
> ==========================================================
> 
> Bean XML definitions are specified with the "Bean-Definitions"
> manifest entry; e.g.,
>     Bean-Definitions: beans/hibernate.xml, beans/someservice.xml
> 
> 
> The old ServiceBinder XML file has been replaced with the <instance/>
> element in the new <bean/> definition (some element names have been
> changed).  Any bean that contains an <instance/> element will be
> handed to ServiceBinder.
> 
> Some issues currently:
> * I would like to support wildcard lookup of bean files, but there
> doesn't appear to be any way to get a list of resources from a bundle.
>  As of now, each xml file has to be explicitly specified.
> * Each service bundle requires its own BeanFactory instance (not sure
> about the overhead with this).
> * Logging all goes to stdout.
> 
> I've made it available for download at:
> http://www.rit.edu/~jrv4595/springservicebinder.zip
> Since the Spring jar is included (twice- once in the source tree and
> once in the compiled bundle), the archive is about 5mb.
> 
> Any questions/comments/suggestions are greatly appreciated. :)
> 
> -Jeremy
-- 
------------------------------------------------------
Humberto Cervantes <[EMAIL PROTECTED]>
Web: http://www.humbertocervantes.net

Universidad Autonoma Metropolitana-Iztapalapa,
San Rafael Atlixco Nº 186, Col. Vicentina, C.P. 09340
Delegación Iztapalapa. Distrito Federal, Mexico

Tel: (52) 55 5804 4634 ext 212
------------------------------------------------------

Reply via email to