本文整理了Java中org.apache.catalina.Lifecycle.start()
方法的一些代码示例,展示了Lifecycle.start()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lifecycle.start()
方法的具体详情如下:
包路径:org.apache.catalina.Lifecycle
类名称:Lifecycle
方法名:start
[英]Prepare for the beginning of active use of the public methods other than property getters/setters and life cycle methods of this component. This method should be called before any of the public methods other than property getters/setters and life cycle methods of this component are utilized. The following LifecycleEvents will be fired in the following order:
代码示例来源:origin: org.apache.tomee/tomee-catalina
@Override
public void start() throws LifecycleException {
if (delegate instanceof Lifecycle) {
((Lifecycle) delegate).start();
}
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Start a new server instance.
*/
public void start() {
// Start the new server
if (server instanceof Lifecycle) {
try {
((Lifecycle) server).start();
} catch (LifecycleException e) {
log.error("Catalina.start: ", e);
}
}
}
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Starts the session manager of this Context.
*/
protected void managerStart() throws LifecycleException {
if ((manager != null) && (manager instanceof Lifecycle)) {
((Lifecycle) getManager()).start();
}
}
代码示例来源:origin: org.apache.tomee/tomee-catalina
@Override
public void start() throws LifecycleException {
if (instance() != null && Lifecycle.class.isInstance(delegate)) {
Lifecycle.class.cast(delegate).start();
} else {
start = true;
}
state = LifecycleState.STARTED;
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6
public void doStart() throws Exception {
server.initialize();
((Lifecycle)server).start();
}
代码示例来源:origin: org.apache.tomee/tomee-catalina
@Override
protected void startInternal() throws LifecycleException {
final Class<?> r = loadClass();
if (r != null && Lifecycle.class.isAssignableFrom(r) && instance() != null) {
Lifecycle.class.cast(instance()).start();
} else {
start = true;
}
setState(LifecycleState.STARTING);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Start {@link Valve}s) in this pipeline and implement the requirements
* of {@link LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
// Start the Valves in our pipeline (including the basic), if any
Valve current = first;
if (current == null) {
current = basic;
}
while (current != null) {
if (current instanceof Lifecycle)
((Lifecycle) current).start();
current = current.getNext();
}
setState(LifecycleState.STARTING);
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Start {@link Valve}s) in this pipeline and implement the requirements
* of {@link LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
// Start the Valves in our pipeline (including the basic), if any
Valve current = first;
if (current == null) {
current = basic;
}
while (current != null) {
if (current instanceof Lifecycle)
((Lifecycle) current).start();
current = current.getNext();
}
setState(LifecycleState.STARTING);
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Start {@link Valve}s) in this pipeline and implement the requirements
* of {@link LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
// Start the Valves in our pipeline (including the basic), if any
Valve current = first;
if (current == null) {
current = basic;
}
while (current != null) {
if (current instanceof Lifecycle)
((Lifecycle) current).start();
current = current.getNext();
}
setState(LifecycleState.STARTING);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
if (store == null)
log.error("No Store configured, persistence disabled");
else if (store instanceof Lifecycle)
((Lifecycle)store).start();
setState(LifecycleState.STARTING);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
if (store == null)
log.error("No Store configured, persistence disabled");
else if (store instanceof Lifecycle)
((Lifecycle)store).start();
setState(LifecycleState.STARTING);
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat
public void startConnectors() throws Exception
{
if (tomcatDeployer == null)
throw new IllegalStateException("Must set TomcatDeployer before starting connectors");
if (connectorsRunning)
return;
MBeanServer server = super.getServer();
ObjectName service = new ObjectName(tomcatDeployer.getDomain() + ":type=Service,serviceName=jboss.web");
Object[] args = {};
String[] sig = {};
Connector[] connectors = (Connector[]) server.invoke(service, "findConnectors", args, sig);
for (int n = 0; n < connectors.length; n++)
{
Lifecycle lc = connectors[n];
lc.start();
}
connectorsRunning = true;
// Notify listeners that connectors have started processing requests
sendNotification(new Notification(TOMCAT_CONNECTORS_STARTED, this, getNextNotificationSequenceNumber()));
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
if (store == null)
log.error("No Store configured, persistence disabled");
else if (store instanceof Lifecycle)
((Lifecycle)store).start();
setState(LifecycleState.STARTING);
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
if (store == null)
log.error("No Store configured, persistence disabled");
else if (store instanceof Lifecycle)
((Lifecycle)store).start();
setState(LifecycleState.STARTING);
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
if (store == null)
log.error("No Store configured, persistence disabled");
else if (store instanceof Lifecycle)
((Lifecycle)store).start();
setState(LifecycleState.STARTING);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
if (store == null)
log.error("No Store configured, persistence disabled");
else if (store instanceof Lifecycle)
((Lifecycle)store).start();
setState(LifecycleState.STARTING);
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
if (store == null)
log.error("No Store configured, persistence disabled");
else if (store instanceof Lifecycle)
((Lifecycle)store).start();
setState(LifecycleState.STARTING);
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
if (store == null)
log.error("No Store configured, persistence disabled");
else if (store instanceof Lifecycle)
((Lifecycle)store).start();
setState(LifecycleState.STARTING);
}
代码示例来源:origin: org.apache.tomee/tomee-catalina
private void addTomEERealm(final Engine engine) {
final Realm realm = engine.getRealm();
if (realm != null && !(realm instanceof TomEERealm) && (engine.getParent() == null || (!realm.equals(engine.getParent().getRealm())))) {
final Realm tomeeRealm = tomeeRealm(realm);
engine.setRealm(tomeeRealm);
if (LifecycleState.STARTING_PREP.equals(engine.getState())) {
try {
Lifecycle.class.cast(tomeeRealm).start();
} catch (final LifecycleException e) {
throw new IllegalStateException(e);
}
}
}
}
代码示例来源:origin: org.mobicents.arquillian.container/mss-tomcat-embedded-6
@Override
public synchronized void addEngine(Engine engine) {
if( log.isDebugEnabled() )
log.debug("Adding engine (" + engine.getInfo() + ")");
// Add this Engine to our set of defined Engines
Engine results[] = new Engine[engines.length + 1];
for (int i = 0; i < engines.length; i++)
results[i] = engines[i];
results[engines.length] = engine;
engines = results;
// Start this Engine if necessary
if (started && (engine instanceof Lifecycle)) {
try {
((Lifecycle) engine).start();
} catch (LifecycleException e) {
log.error("Engine.start", e);
}
}
service.setContainer(engine);
}
内容来源于网络,如有侵权,请联系作者删除!