*/
protected void doInit() throws Exception {
super.doInit();
su = new ServiceUnit();
su.setComponent(WSNSpringComponent.this);
WSNDeployer deployer = new WSNDeployer(WSNSpringComponent.this);
if (resources != null) {
for (int i = 0; i < resources.length; i++) {
Endpoint ep = deployer.createEndpoint(resources[i].getURL());
ep.setServiceUnit(su);
su.addEndpoint(ep);
}
}
if (requests != null) {
for (int i = 0; i < requests.length; i++) {
Endpoint ep = deployer.createEndpoint(requests[i]);
ep.setServiceUnit(su);
su.addEndpoint(ep);
}
}
getRegistry().registerServiceUnit(su);