use of org.apache.cxf.common.logging.RegexLoggingFilter in project tomee by apache.
the class ServerImpl method initDestination.
private void initDestination(DestinationFactory destinationFactory) throws BusException, IOException {
EndpointInfo ei = endpoint.getEndpointInfo();
// Of course its not an ideal situation here to use a hard-coded prefix. To be refactored.
if (destinationFactory == null) {
if (ei.getAddress() != null && ei.getAddress().indexOf("local://") != -1) {
destinationFactory = bus.getExtension(DestinationFactoryManager.class).getDestinationFactoryForUri(ei.getAddress());
}
if (destinationFactory == null) {
destinationFactory = bus.getExtension(DestinationFactoryManager.class).getDestinationFactory(ei.getTransportId());
}
}
destination = destinationFactory.getDestination(ei, bus);
String wantFilter = ei.getAddress();
if (wantFilter != null && wantFilter.startsWith("jms")) {
RegexLoggingFilter filter = new RegexLoggingFilter();
filter.setPattern("jms(.*?)password=+([^ ]+)");
filter.setGroup(2);
wantFilter = filter.filter(wantFilter).toString();
}
LOG.info("Setting the server's publish address to be " + wantFilter);
serverRegistry = bus.getExtension(ServerRegistry.class);
mep = new ManagedEndpoint(bus, endpoint, this);
slcMgr = bus.getExtension(ServerLifeCycleManager.class);
if (slcMgr != null) {
slcMgr.registerListener(mep);
}
iMgr = bus.getExtension(InstrumentationManager.class);
if (iMgr != null) {
try {
iMgr.register(mep);
} catch (JMException jmex) {
LOG.log(Level.WARNING, "Registering ManagedEndpoint failed.", jmex);
}
}
}
use of org.apache.cxf.common.logging.RegexLoggingFilter in project cxf by apache.
the class ServerImpl method initDestination.
private void initDestination(DestinationFactory destinationFactory) throws BusException, IOException {
EndpointInfo ei = endpoint.getEndpointInfo();
// Of course its not an ideal situation here to use a hard-coded prefix. To be refactored.
if (destinationFactory == null) {
if (ei.getAddress() != null && ei.getAddress().indexOf("local://") != -1) {
destinationFactory = bus.getExtension(DestinationFactoryManager.class).getDestinationFactoryForUri(ei.getAddress());
}
if (destinationFactory == null) {
destinationFactory = bus.getExtension(DestinationFactoryManager.class).getDestinationFactory(ei.getTransportId());
}
}
destination = destinationFactory.getDestination(ei, bus);
String wantFilter = ei.getAddress();
if (wantFilter != null && wantFilter.startsWith("jms")) {
RegexLoggingFilter filter = new RegexLoggingFilter();
filter.setPattern("jms(.*?)password=+([^ ]+)");
filter.setGroup(2);
wantFilter = filter.filter(wantFilter).toString();
}
LOG.info("Setting the server's publish address to be " + wantFilter);
serverRegistry = bus.getExtension(ServerRegistry.class);
mep = new ManagedEndpoint(bus, endpoint, this);
slcMgr = bus.getExtension(ServerLifeCycleManager.class);
if (slcMgr != null) {
slcMgr.registerListener(mep);
}
iMgr = bus.getExtension(InstrumentationManager.class);
if (iMgr != null) {
try {
iMgr.register(mep);
} catch (JMException jmex) {
LOG.log(Level.WARNING, "Registering ManagedEndpoint failed.", jmex);
}
}
}
Aggregations