|
|
|
|
Re: Service Factory with Declared Service [message #1181554 is a reply to message #1181380] |
Mon, 11 November 2013 17:27 |
BJ Hargrave Messages: 60 Registered: July 2009 |
Member |
|
|
When you use servicefactory=true in DS, your implementation class must NOT implement ServiceFactory. DS takes care of creating the instances of your implementation class. So make your implementation class be LoggerImpl and not LoggerServiceFactory.
<implementation class="org.my.impl.LoggerImpl"/>
<service servicefactory="true">
<provide interface="org.my.ILogger"/>
</service>
Also, make sure to place your service types (e.g. ILogger) in a different package than your impl types (e.g. LoggerImpl).
[Updated on: Mon, 11 November 2013 17:29] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02073 seconds