summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/services/smsgateway-corba
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-11-05 21:14:49 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-11-05 21:14:49 +0000
commit8c049462ff6387d8c3f69f4e42a4c4b36e38a90c (patch)
tree3e6b1ec1ab2e2a724d9228ca55052394c3034060 /sandbox/travelsample/services/smsgateway-corba
parent68c3920fc0ba41c6a9ebf062bd41e5ebf647e51b (diff)
Format the code
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@833174 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample/services/smsgateway-corba')
-rw-r--r--sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayCORBAServiceBootstrap.java20
-rw-r--r--sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayServant.java1
2 files changed, 10 insertions, 11 deletions
diff --git a/sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayCORBAServiceBootstrap.java b/sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayCORBAServiceBootstrap.java
index b21bff7a1b..3ea7f7de44 100644
--- a/sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayCORBAServiceBootstrap.java
+++ b/sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayCORBAServiceBootstrap.java
@@ -30,30 +30,30 @@ public class SMSGatewayCORBAServiceBootstrap {
public static void main(String[] args) throws Exception {
System.out.println("Publishing SMS Gateway Service as a CORBA service: SMSGatewayCORBAService (port=5080)");
-
+
String[] orbArgs = {"-ORBInitialPort", "5080"};
- ORB orb = ORB.init( orbArgs, null );
+ ORB orb = ORB.init(orbArgs, null);
NamingContextExt namingCtx;
try {
- Object objRef = orb.resolve_initial_references("NameService");
- namingCtx = NamingContextExtHelper.narrow(objRef);
+ Object objRef = orb.resolve_initial_references("NameService");
+ namingCtx = NamingContextExtHelper.narrow(objRef);
} catch (Exception ex) {
- System.err.println("ERROR: Failed to resolve Name Service.");
- System.err.println("Don't forget to run it with:");
- System.err.println(" tnameserv -ORBInitialPort 5080");
- return;
+ System.err.println("ERROR: Failed to resolve Name Service.");
+ System.err.println("Don't forget to run it with:");
+ System.err.println(" tnameserv -ORBInitialPort 5080");
+ return;
}
Object rootPoaRef = orb.resolve_initial_references("RootPOA");
POA rootPoa = POAHelper.narrow(rootPoaRef);
rootPoa.the_POAManager().activate();
-
+
SMSGatewayServant smsGateway = new SMSGatewayServant();
Object smsGatewayRef = rootPoa.servant_to_reference(smsGateway);
String corbaServerName = "SMSGatewayCORBAService";
- NameComponent[] name = { new NameComponent(corbaServerName, "") };
+ NameComponent[] name = {new NameComponent(corbaServerName, "")};
namingCtx.rebind(name, smsGatewayRef);
System.out.println("CORBA server running - waiting for requests");
diff --git a/sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayServant.java b/sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayServant.java
index 5e43b671a0..693a909dca 100644
--- a/sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayServant.java
+++ b/sandbox/travelsample/services/smsgateway-corba/src/main/java/scatours/smsgateway/SMSGatewayServant.java
@@ -18,7 +18,6 @@
*/
package scatours.smsgateway;
-
public class SMSGatewayServant extends SMSGatewayPOA {
public boolean sendSMS(String fromNumber, String toNumber, String text) {