On 06/22/2012 08:17 AM, Rajbir Saini wrote:
No This is not wrong. Service references could be any other other
deployed services.
How is your other service deployed? If it is deployed using blueprint
do you see it as 'created' under blueprint column of 'list' command?
Raj
On Friday 22 June 2012 06:41 PM, ramesh chandra wrote:
Is it wrong to pass reference interface to a bean from other bundle
in blueprint ?
In my service bundle, there is just one Impl class , and in blueprint
I am passing an interface (which is from another bundle ) as
reference to this class.
import *com.fromsomeotherbundle*.dao.ReqDAO;
public class ReqServiceImpl implements ReqService {
private ReqDAO reqDAO;
public ReqServiceImpl() {
// Requestor r = new Requestor();
}
public ReqServiceImpl(ReqDAO reqDAO) {
this.reqDAO = reqDAO;
}
public void addMember(Requestor requestor){
String rkey = requestor.getId();
String col1 = requestor.getCity();
String col2 = requestor.getCountry();
reqDAO.insertMulti(rkey, col1, col2);
// return Response.created(URI.create("/members/" +
person.getId())).build();
}
}
<bean id="reqServiceBean"
class="com.tableters.alpha.invite.service.ReqServiceImpl">
<property name="ReqDAO" ref="reqDAOref"/>
</bean>
<reference id="reqDAOref"
interface="com.tableters.alpha.invite.dao.ReqDAO"/>
* There is no dependency issue and all imports are fine.
Is this approach wrong ? Because when I start this bundle, its
waiting on ReqDAO.
And what is the right approach ?
Appreciate any help.
best regards,
Ramesh
Thanks for the response. I do see the other bundle active when I do
'list'. It is not a blueprint bundle. But when I 'ls', I don't see any
reference to this service.
Does it mean , the packages are not exported ?
thanks & regards,
Ramesh