public Object start(IApplicationContext ctx) throws Exception { log.info("Starting client"); // A HOSTNAME VERIFIER THAT ACCEPTS EVERY HOSTS HostnameVerifier myhostnameverifier = new HostnameVerifier() { @Override public boolean verify(String urlHostName, SSLSession session) { return true; } }; // // start restlet context context = new Context(); context.getAttributes().put("sslContextFactory", new ClientSSLContextFactory()); context.getAttributes().put("hostnameVerifier", myhostnameverifier); List<Protocol> list = new ArrayList<Protocol>(); list.add(Protocol.HTTPS); Client client = new Client(context, list, HttpClientHelper.class.getName()); context.setClientDispatcher(client); client.start(); Adempiere.startup(true); org.compiere.AdempiereClient.main(new String[] {}); return IApplication.EXIT_OK; }
/** * *********************************************************************** Test * * @param args ignored */ public static void main(String[] args) { Adempiere.startup(true); Env.setContext(Env.getCtx(), "#AD_Client_ID", 11); FormFrame ff = new FormFrame(); ff.openForm(1111, "org.compiere.apps.form.VAttributeGrid", "Attribute Table"); ff.pack(); AEnv.showCenterScreen(ff); } // main
@BeforeClass public static void init() { final String username = System.getProperty("user.name"); System.setProperty( "PropertyFile", new File(new File("../de.metas.endcustomer./"), "Adempiere.properties_" + username) .getAbsolutePath()); org.compiere.Adempiere.startup(true); // Cleanup T_Query_Selection table DB.executeUpdateEx("delete from t_query_selection", new Object[0], ITrx.TRXNAME_None); }
public static void main(String[] args) { Adempiere.startup(true); Ini.setProperty(Ini.P_UID, "SuperUser"); Ini.setProperty(Ini.P_PWD, "System"); Ini.setProperty(Ini.P_ROLE, "GardenWorld Admin"); Ini.setProperty(Ini.P_CLIENT, "GardenWorld"); Ini.setProperty(Ini.P_ORG, "HQ"); Ini.setProperty(Ini.P_WAREHOUSE, "HQ Warehouse"); Ini.setProperty(Ini.P_LANGUAGE, "English"); // Ini.setProperty(Ini.P_PRINTER,"MyPrinter"); Login login = new Login(Env.getCtx()); login.batchLogin(); ForecastEngine engine = ForecastEngine.get(); }
public static boolean initWeb() { if (s_initOK) { // log.info(context.getServletContextName()); return true; } // TODO: // Load Environment Variables (serverApps/src/web/WEB-INF/web.xml) try { // CLogMgt.setLevel(Level.OFF); /* ADEMPIERE/COMPIERE */ // s_initOK = Compiere.startup(false); s_initOK = Adempiere.startup(false); } catch (Exception ex) { log.log(Level.SEVERE, "startup", ex); } if (!s_initOK) return false; // Logging now initiated // log.info(info.toString()); // Properties ctx = new Properties(); MClient client = MClient.get(ctx, 0); MSystem system = MSystem.get(ctx); // Env.setContext( ctx, "#AD_Language", "pl_PL" ); // client.sendEMail(client.getRequestEMail(), // "Server started: " + system.getName() // ,"ServerInfo: " + context.getServerInfo() // ); return s_initOK; }
/** * ************************************************************************* Test * * @param args ignored */ public static void main(String[] args) { Adempiere.startup(true); MAlertProcessor model = new MAlertProcessor(Env.getCtx(), 100, null); AlertProcessor ap = new AlertProcessor(model); ap.start(); }