1
2
3
4
5
6
7
8
9
10
11 package org.mule.examples.loanbroker.esb;
12
13 import org.mule.examples.loanbroker.AbstractLoanBrokerApp;
14 import org.mule.examples.loanbroker.LocaleMessage;
15
16 import java.io.IOException;
17
18
19
20
21
22 public class LoanBrokerApp extends AbstractLoanBrokerApp
23 {
24 public LoanBrokerApp(String config) throws Exception
25 {
26 super(config);
27 }
28
29 public static void main(String[] args) throws Exception
30 {
31 LoanBrokerApp loanBrokerApp = null;
32 loanBrokerApp = new LoanBrokerApp(getInteractiveConfig());
33 loanBrokerApp.run(false);
34 }
35
36 protected static String getInteractiveConfig() throws IOException
37 {
38 int response = 0;
39
40 System.out.println("******************\n"
41 + LocaleMessage.esbWelcome()
42 + "\n******************");
43 response = readCharacter();
44 if (response == '1')
45 {
46 System.out.println(LocaleMessage.loadingEndpointEjb());
47 return "loan-broker-esb-mule-config.xml";
48 }
49 else
50 {
51 System.out.println(LocaleMessage.loadingManagedEjb());
52 return "loan-broker-esb-mule-config-with-ejb-container.xml";
53 }
54 }
55 }