[
https://issues.apache.org/jira/browse/TUSCANY-3658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902522#action_12902522
]
winston antony commented on TUSCANY-3658:
-----------------------------------------
Thanks Raymond. That really works. I have a question that. If i write those 2
lines inside the init method, it is not getting the reference of sca service.
But if i move the same code to some other method it is working. so By the time
init method is called, won't the SCADomain be available/loaded for the
application?
If i try to get the service in INIT method, It is throwing an error that
'org.oasisopen.sca.NoSuchDomainException: default'
.......
Caused by: java.lang.IllegalArgumentException: Must specify remote IP
address(es) for domain
........
xxxInterface xxxSCAService = null;
@PostConstruct
public void init() {
System.out.println("init method is
called..............................................");
SCAClientFactory factory = SCAClientFactory.newInstance(URI.create("default"));
xxxSCAService = factory.getService(xxxInterface.class,
"xxxComponent/xxxService");
}
> SCA with JSF+Spring+Hibernate webapplication
> --------------------------------------------
>
> Key: TUSCANY-3658
> URL: https://issues.apache.org/jira/browse/TUSCANY-3658
> Project: Tuscany
> Issue Type: Test
> Components: Java SCA Spring Implementation Extension
> Affects Versions: Java-SCA-2.0-M5
> Environment: WebApplication using JSF, Spring, Hibernate, Tuscany
> Reporter: winston antony
>
> I am Implementing SCA in a Spring+JSF+Hibernate webapplication. I have done
> the below steps to expose the service layer of our aplication as SCA...But
> there is no help on how to access that SCA service in a controller layer
> which is nothing but a java class. the application strucuture is DAO -->
> service (SCA) --> Controller (Spring beans) -->....
> 1. Have written a web.composite under web-inf directory
> <component name="UserComponent">
> <implementation.spring location="/WEB-INF/applicationContext.xml"/>
> <service name="userServices">
> <interface.java interface="com.test.services.user.IUser"/>
>
> </service>
> </component>
> 2. In an applicationContext file
> <bean id="userServiceImpl" class="com.test.services.user.impl.UserImpl">
> </bean>
> <sca:service name="userServices"
> type="com.test.services.user.IUser" target="userServiceImpl"/>
>
> <bean id="userController" class="com.test.controller.user.UserController">
> <property name="userServices" ref="userServices" />
> </bean>
> But it is not able to find the userServices which is an SCA service. how can
> i access the sca services?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.