import javax.swing.*;
import configuration.ConfigXML;
-//import businessLogic.FacadeImplementation;
-import businessLogic.ApplicationFacadeInterface;
-import businessLogic.FacadeImplementation;
-
import java.rmi.*;
import java.awt.Color;
import java.awt.Font;
private JButton boton3 = null;
private static configuration.ConfigXML c;
- public static ApplicationFacadeInterface facadeInterface;
+ //public static ApplicationFacadeInterface facadeInterface;
private JLabel lblNewLabel;
public static void main(String[] args) {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
c=configuration.ConfigXML.getInstance();
- if (c.isBusinessLogicLocal())
- facadeInterface=new FacadeImplementation();
+ if (c.isBusinessLogicLocal()){
+ //facadeInterface=new FacadeImplementation();
+ }
else {
final String businessLogicNode = c.getBusinessLogicNode();
// RMI server port number
int portNumber = Integer.parseInt(c.getPortRMI());
// RMI server host IP IP
- facadeInterface = (ApplicationFacadeInterface) Naming.lookup("rmi://"
- + businessLogicNode + ":" + portNumber + serviceName);
+ /*facadeInterface = (ApplicationFacadeInterface) Naming.lookup("rmi://"
+ + businessLogicNode + ":" + portNumber + serviceName);*/
}
- } catch (java.rmi.ConnectException e) {
+ }/* catch (java.rmi.ConnectException e) {
a.lblNewLabel.setText("No business logic: Run BusinessLogicServer first!!");
a.lblNewLabel.setForeground(Color.RED);
System.out.println("Error in StartWindow: "+e.toString());
a.lblNewLabel.setText("No business logic: Maybe problems running BusinessLogicServer");
a.lblNewLabel.setForeground(Color.RED);
System.out.println("Error in StartWindow: "+e.toString());
- } catch (com.db4o.ext.DatabaseFileLockedException e) {
+ } */catch (com.db4o.ext.DatabaseFileLockedException e) {
a.lblNewLabel.setText("Database locked: Do not run BusinessLogicServer or BusinessLogicServer!!");
a.lblNewLabel.setForeground(Color.RED);
System.out.println("Error in StartWindow: "+e.toString());
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
- ApplicationFacadeInterface facade=StartWindow.facadeInterface;
- try {
- if (c.isBusinessLogicLocal()) facade.close();
- } catch (Exception e1) {
- // TODO Auto-generated catch block
- System.out.println("Error: "+e1.toString()+" , probably problems with Business Logic or Database");
- }
System.exit(1);
}
});
initialize();
//this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
- public static ApplicationFacadeInterface getBusinessLogic(){
- return facadeInterface;
- }
+
/**