[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ecf-dev] ECF Spring Support
|
Hi Angelo,
Angelo zerr wrote:
Hi Scott,
I have try to manage host remoting services with my Spring support
(I'm using my LocalContainerFactoryBean class) and it works:) The
bundle need NONE Java code, only XML file Spring is used. Here this
XML file Spring :
<?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:osgi="http://www.springframework.org/schema/osgi"
xsi:schemaLocation="http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<osgi:reference id="containerManager"
interface="org.eclipse.ecf.core.IContainerManager"
timeout="1000" />
<bean
class="org.springframework.remoting.ecf.LocalContainerFactoryBean">
<property name="containerManager"
ref="containerManager"></property>
<property name="containerType"
value="ecf.generic.server"></property>
</bean>
<bean id="helloService"
class="org.eclipse.ecf.examples.remoteservices.hello.impl.Hello"></bean>
<osgi:service ref="helloService"
interface="org.eclipse.ecf.examples.remoteservices.hello.IHello">
<osgi:service-properties>
<entry key="osgi.remote.interfaces" value="*" />
</osgi:service-properties>
</osgi:service>
</beans>
I think you can use Spring DM without my LocalContainerFactoryBean
class which create the ECF IContainer, but with this class you are
full declarative. I have seen your work about DS and you must create
IContainer into Java.
I have intention to create a bug with my work but before I have
several questions :
1. Package name.
1.1 org.springframework.remoting.ecf.*
My class LocalContainerFactoryBean is into the bundle
org.springframework.remoting.ecf into the package
org.springframework.remoting.ecf. I have choosen this package name
because it's base package name of Spring remoting (ex :
org.springframework.remoting.httpinvoker).
My question is do you agree to have this package name or do you prefer
having a package name like org.eclipse.ecf.springframework ?
If it's going to be in the ECF repository is must be under the namespace
org.eclipse.ecf. If you would rather contribute it to the Spring
codebase it could be named org.springframework.* ...and that would be
completely OK with me, but you would have to engage the Spring people
about using the org.springframework.* namespace. That's not a bad idea
BTW...i.e. notifying the Spring framework people about this work...as
they have just proposed the Virgo project:
http://www.eclipse.org/proposals/virgo/
And the work you are doing could very well be considered a useful
addition to that project. So perhaps I will notify the people at Spring
that I know of about this work (with your permission).
So, I would suggest something like org.eclipse.ecf.spring or
org.eclipse.ecf.springframework. But one question...is this *API* code
(i.e. meant to be reused?) or would it be part of the example code? If
it's example code (showing the use of ECF remote services with Spring),
then it should probably go in a namespace like:
org.eclipse.ecf.examples.* ...e.g. org.eclipse.ecf.examples.spring or
org.eclipse.ecf.examples.springframework.
1.2 hello consumer/host example with Spring DM.
I have named my projects
org.eclipse.ecf.examples.remoteservices.hello.springdm.consumer and
org.eclipse.ecf.examples.remoteservices.hello.springdm.host.
Is it ok with that? (I have followed the DS name
org.eclipse.ecf.examples.remoteservices.hello.ds.consumer)
Yes, that's good/fine. The names are unfortunately long, but I think
consistency will be better to maintain here (since this code will become
part of the examples).
2. Question about IContainer.
I would like manage into my LocalContainerFactoryBean the URL
(containerId) of client/server side, but I'm newbie with ECF and I
don't know how manage that? Could you help me for that? Thank a lot.
Sure...I can/will help with that. I'm not sure exactly what you mean by
manage, though. Let's discuss directly when we chat as per below.
If you have time and you want we could tchat together to discuss about
Spring Support for ECF.
If you have access to Skype, please contact me at sblewis (skype user
id). If not please send an email directly to slewis at composent.com
and we'll arrange some way to talk/chat directly.
Thanks...for your contribution.
Scott