IteraciĆ³n 3(VersiĆ³n sin idiomas)
[ISBets21MAUBRY] / eclipse-workspace / ISBets21MAUBRY / src / main / java / businessLogic / BusinessLogicServerAWS.java
1 package businessLogic;
2
3 import javax.xml.ws.Endpoint;
4
5 import configuration.ConfigXML;
6
7 public class BusinessLogicServerAWS {
8                 
9         public static void main(String args[]){
10
11                 String service;
12                 
13                 ConfigXML c=ConfigXML.getInstance();
14
15
16                 if (c.isBusinessLogicLocal()) {
17                         System.out.println("\nERROR, the business logic is configured as local");
18                 }
19                 else {
20                 try {
21                         
22                         if (!c.isDatabaseLocal()) {
23                                 System.out.println("\nWARNING: Please be sure ObjectdbManagerServer is launched\n           in machine: "+c.getDatabaseNode()+" port: "+c.getDatabasePort()+"\n");      
24                         }
25
26                         service= "http://"+c.getBusinessLogicNode() +":"+ c.getBusinessLogicPort()+"/ws/"+c.getBusinessLogicName();
27                                 
28                         Endpoint.publish(service, new BLFacadeImplementation());
29
30                         System.out.println("\n\nRunning service at:\n\t" + service);
31                         System.out.println("\n\n\nPress button to exit this server... ");
32                         
33                 } catch (Exception e) {
34                         System.out.println(e.toString());
35                 }
36          }
37         }
38 }