本文整理了Java中org.apache.tomcat.util.modeler.Registry.getRegistry
方法的一些代码示例,展示了Registry.getRegistry
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Registry.getRegistry
方法的具体详情如下:
包路径:org.apache.tomcat.util.modeler.Registry
类名称:Registry
方法名:getRegistry
[英]Get a "singelton" registry, or one per thread if setUseContextLoader was called
[中]获取一个“Singleton”注册表,如果调用了setUseContextLoader,则每个线程一个
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
/** Get a "singelton" registry, or one per thread if setUseContextLoader
* was called
*
* @deprecated Not enough info - use the method that takes CL and domain
* @since 1.0
*/
public synchronized static Registry getRegistry() {
return getRegistry(null, null);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Initialize this servlet.
*/
@Override
public void init() throws ServletException {
// Retrieve the MBean server
registry = Registry.getRegistry(null, null);
mBeanServer = Registry.getRegistry(null, null).getMBeanServer();
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Initialize this servlet.
*/
@Override
public void init() throws ServletException {
// Retrieve the MBean server
registry = Registry.getRegistry(null, null);
mBeanServer = Registry.getRegistry(null, null).getMBeanServer();
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Initialize this servlet.
*/
@Override
public void init() throws ServletException {
// Retrieve the MBean server
registry = Registry.getRegistry(null, null);
mBeanServer = Registry.getRegistry(null, null).getMBeanServer();
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Create and configure (if necessary) and return the
* <code>MBeanServer</code> with which we will be
* registering our <code>DynamicMBean</code> implementations.
* @return the singleton MBean server
*/
public static synchronized MBeanServer createServer() {
if (mserver == null) {
mserver = Registry.getRegistry(null, null).getMBeanServer();
}
return mserver;
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Create and configure (if necessary) and return the
* <code>MBeanServer</code> with which we will be
* registering our <code>DynamicMBean</code> implementations.
*/
public static synchronized MBeanServer createServer() {
if (mserver == null) {
mserver = Registry.getRegistry(null, null).getMBeanServer();
}
return (mserver);
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Factory method to create (if necessary) and return our
* <code>MBeanServer</code> instance.
*
* @since 1.0
* @deprecated Use the instance method
*/
public static MBeanServer getServer() {
return Registry.getRegistry().getMBeanServer();
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Set the <code>MBeanServer</code> to be utilized for our
* registered management beans.
*
* @param mbeanServer The new <code>MBeanServer</code> instance
* @since 1.0
* @deprecated Use the instance method
*/
public static void setServer(MBeanServer mbeanServer) {
Registry.getRegistry().setMBeanServer(mbeanServer);
}
代码示例来源:origin: jboss.web/jbossweb
public void stop() throws LifecycleException {
super.stop();
if( mbeans != null ) {
try {
Registry.getRegistry(null, null).invoke(mbeans, "stop", false);
} catch (Exception e) {
log.error("Error in stop() for " + mbeansFile, e);
}
}
}
代码示例来源:origin: jboss.web/jbossweb
public void init() throws Exception {
if( mbeans==null) execute();
if( registry==null ) registry=Registry.getRegistry();
registry.invoke(mbeans, "init", false);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public Void run() {
try {
Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
} catch (Exception e) {
log.warn("Error registering request");
}
return null;
}
});
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public Void run() {
try {
Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
} catch (Exception e) {
log.warn("Error registering request");
}
return null;
}
});
代码示例来源:origin: org.jboss.web/jbossweb
public void execute() throws Exception {
if( registry==null ) registry=Registry.getRegistry();
try {
ManagedBean managed=createManagedBean(registry, null, (Class)source, type);
if( managed==null ) return;
managed.setName( type );
mbeans.add(managed);
} catch( Exception ex ) {
CoyoteLogger.MODELER_LOGGER.errorReadingDescriptors(ex);
}
}
代码示例来源:origin: org.jboss.web/jbossweb
public void destroy() throws Exception {
CoyoteLogger.AJP_LOGGER.stoppingAjpProtocol(getName());
endpoint.destroy();
if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
if (tpOname!=null)
Registry.getRegistry(null, null).unregisterComponent(tpOname);
if (rgOname != null)
Registry.getRegistry(null, null).unregisterComponent(rgOname);
}
}
代码示例来源:origin: org.jboss.web/jbossweb
public void destroy() throws Exception {
CoyoteLogger.HTTP_BIO_LOGGER.stopHttpConnector(getName());
endpoint.destroy();
if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
if (tpOname!=null)
Registry.getRegistry(null, null).unregisterComponent(tpOname);
if (rgOname != null)
Registry.getRegistry(null, null).unregisterComponent(rgOname);
}
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
public void destroy() throws Exception {
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.stop", getName()));
endpoint.destroy();
if (tpOname!=null)
Registry.getRegistry(null, null).unregisterComponent(tpOname);
if (rgOname != null)
Registry.getRegistry(null, null).unregisterComponent(rgOname);
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
public void execute() throws Exception {
if( registry==null ) registry=Registry.getRegistry(null, null);
try {
ManagedBean managed = createManagedBean(registry, null,
(Class<?>)source, type);
if( managed==null ) return;
managed.setName( type );
registry.addManagedBean(managed);
} catch( Exception ex ) {
log.error( "Error reading descriptors ", ex);
}
}
代码示例来源:origin: codefollower/Tomcat-Research
public void execute() throws Exception {
if( registry==null ) registry=Registry.getRegistry(null, null);
try {
ManagedBean managed = createManagedBean(registry, null,
(Class<?>)source, type);
if( managed==null ) return;
managed.setName( type );
registry.addManagedBean(managed);
} catch( Exception ex ) {
log.error( "Error reading descriptors ", ex);
}
}
代码示例来源:origin: org.jboss.web/jbossweb
private void unregsiterJMX() {
// unregister this component
if (oname != null) {
try {
Registry.getRegistry(null, null).unregisterComponent(oname);
} catch(Exception ex) {
CatalinaLogger.CORE_LOGGER.filterJmxUnregistrationFailed(getFilterClass(), getFilterName(), ex);
}
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
private void unregisterJmx(SSLHostConfig sslHostConfig) {
Registry registry = Registry.getRegistry(null, null);
registry.unregisterComponent(sslHostConfig.getObjectName());
for (SSLHostConfigCertificate sslHostConfigCert : sslHostConfig.getCertificates()) {
registry.unregisterComponent(sslHostConfigCert.getObjectName());
}
}
内容来源于网络,如有侵权,请联系作者删除!