You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jm...@apache.org on 2007/01/05 11:36:30 UTC
svn commit: r492967 -
/incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/BusServiceImpl.java
Author: jmarino
Date: Fri Jan 5 02:36:30 2007
New Revision: 492967
URL: http://svn.apache.org/viewvc?view=rev&rev=492967
Log:
change celtix binding to use to @EagerInit
Modified:
incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/BusServiceImpl.java
Modified: incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/BusServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/BusServiceImpl.java?view=diff&rev=492967&r1=492966&r2=492967
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/BusServiceImpl.java (original)
+++ incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/BusServiceImpl.java Fri Jan 5 02:36:30 2007
@@ -21,52 +21,40 @@
import java.util.Map;
import java.util.WeakHashMap;
-import org.apache.tuscany.idl.wsdl.WSDLDefinitionRegistry;
-
-import org.objectweb.celtix.Bus;
-import org.objectweb.celtix.BusException;
import org.osoa.sca.annotations.Destroy;
-import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.EagerInit;
import org.osoa.sca.annotations.Property;
import org.osoa.sca.annotations.Scope;
+import org.apache.tuscany.idl.wsdl.WSDLDefinitionRegistry;
+import org.objectweb.celtix.Bus;
+import org.objectweb.celtix.BusException;
+
/**
* The default implementation of the Celtix Bus system service
*
* @version $Rev$ $Date$
*/
@Scope("COMPOSITE")
+@EagerInit
public class BusServiceImpl implements BusService {
-
protected WSDLDefinitionRegistry wsdlRegistry;
private Bus bus;
- public Bus getBus() {
- return bus;
- }
-
- /**
- * FIXME the annotation processing framework must inject this
- * @param wsdlReg
- */
- @Property (override = "must")
- public void setWsdlRegistry(WSDLDefinitionRegistry wsdlReg) {
- wsdlRegistry = wsdlReg;
- }
-
- /**
- * Initializes the bus, set to be called when the runtime initializes the Celtix system composite
- * @throws BusException
- */
- @Init(eager = true)
- public void init() throws BusException {
+ public BusServiceImpl(@Property(override = "may")WSDLDefinitionRegistry wsdlRegistry) throws BusException {
+ this.wsdlRegistry = wsdlRegistry;
Map<String, Object> properties = new WeakHashMap<String, Object>();
properties.put("celtix.WSDLManager", new TuscanyWSDLManager(wsdlRegistry));
bus = Bus.init(new String[0], properties);
}
+ public Bus getBus() {
+ return bus;
+ }
+
/**
* Shuts down the bus, called when the runtime stops the Celtix system composite
+ *
* @throws BusException
*/
@Destroy
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org