/** * {@inheritDoc} */ public void init() throws Exception { super.init(); String config=_configuration; if (config == null || config.trim().length() == 0) { config = DEFAULT_HIBERNATE_CFG_XML; } final URL configXml = Thread.currentThread().getContextClassLoader().getResource(config); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Hibernate configure: "+configXml); } _jpaStore = new JpaStore(configXml, JNDI_PROPERTY); }
/** * Initialize the activity validator. * * @throws Exception Failed to initialize */ public void init() throws Exception { if (!_initialized) { _initialized = true; if (_predicate != null) { _predicate.init(); } if (_eventProcessor != null) { _eventProcessor.init(); } } }
/** * {@inheritDoc} */ public void init() throws Exception { super.init(); // Obtain JavaMail session InitialContext context=new InitialContext(); _session = (Session)context.lookup(_jndiName); // Initialize scripts initSubjectScript(); initContentScript(); // Validate validate(); }
/** * {@inheritDoc} */ public void init() throws Exception { super.init(); // Load the script java.io.InputStream is=Thread.currentThread().getContextClassLoader().getResourceAsStream(_script); if (is == null) { throw new Exception("Unable to locate MVEL script '"+_script+"'"); } else { byte[] b=new byte[is.available()]; is.read(b); is.close(); // Compile expression _scriptExpression = MVEL.compileExpression(new String(b)); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Initialized script="+_script +" compiled="+_scriptExpression); } } _context = new DefaultEPContext(getServices(), getParameters()); }
/** * This method initializes the node. * * @throws Exception Failed to initialize the node */ protected void init() throws Exception { if (getPredicate() != null) { getPredicate().init(); } if (getEventProcessor() == null) { throw new Exception("Event Processor has not been configured for node"); } getEventProcessor().init(); if (getEventProcessor().getAsynchronous()) { _handler = new NodeResultHandler(); getEventProcessor().setResultHandler(_handler); } }