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 | 0 | super(config); |
27 | 0 | } |
28 | |
|
29 | |
public static void main(String[] args) throws Exception |
30 | |
{ |
31 | 0 | LoanBrokerApp loanBrokerApp = null; |
32 | 0 | loanBrokerApp = new LoanBrokerApp(getInteractiveConfig()); |
33 | 0 | loanBrokerApp.run(false); |
34 | 0 | } |
35 | |
|
36 | |
protected static String getInteractiveConfig() throws IOException |
37 | |
{ |
38 | 0 | int response = 0; |
39 | |
|
40 | 0 | System.out.println("******************\n" |
41 | |
+ LocaleMessage.esbWelcome() |
42 | |
+ "\n******************"); |
43 | 0 | response = readCharacter(); |
44 | 0 | if (response == '1') |
45 | |
{ |
46 | 0 | System.out.println(LocaleMessage.loadingEndpointEjb()); |
47 | 0 | return "loan-broker-esb-mule-config.xml"; |
48 | |
} |
49 | |
else |
50 | |
{ |
51 | 0 | System.out.println(LocaleMessage.loadingManagedEjb()); |
52 | 0 | return "loan-broker-esb-mule-config-with-ejb-container.xml"; |
53 | |
} |
54 | |
} |
55 | |
} |