julio
Oct 22nd, 2007, 07:11 AM
Hi,
I have a generic service in my pojo-model with its interface (IMyService) and relative "impl" (MyService) class.
Interface reports "exported" methods for service. This method needs (like others services) of an "init" method.
And so I made "Initialize" interface with "public void init()" only.
If "IMyService" is injected in a bean like this:
<bean id="test"...>
<property name="myService" ref="myService" />
</bean>
where:
<bean id="myService" class="org.myapp.model.MyService" />
and I implements property in bean "test" class like this:
private IMyService myService;
obviously test-bean cannot see "init" method unless "IMyService extends Initialize"
Has it a sense extends interface or I missing anything:)?
Thanks,
Julio
I have a generic service in my pojo-model with its interface (IMyService) and relative "impl" (MyService) class.
Interface reports "exported" methods for service. This method needs (like others services) of an "init" method.
And so I made "Initialize" interface with "public void init()" only.
If "IMyService" is injected in a bean like this:
<bean id="test"...>
<property name="myService" ref="myService" />
</bean>
where:
<bean id="myService" class="org.myapp.model.MyService" />
and I implements property in bean "test" class like this:
private IMyService myService;
obviously test-bean cannot see "init" method unless "IMyService extends Initialize"
Has it a sense extends interface or I missing anything:)?
Thanks,
Julio