use of org.apache.tomee.catalina.OpenEJBNamingResource in project tomee by apache.
the class OpenEJBContextConfig method contextConfig.
@Override
protected void contextConfig(final Digester digester) {
final NamingResourcesImpl resources;
if (context != null) {
resources = context.getNamingResources();
} else {
resources = null;
}
if (resources instanceof OpenEJBNamingResource) {
((OpenEJBNamingResource) resources).setTomcatResource(true);
}
super.contextConfig(digester);
if (resources instanceof OpenEJBNamingResource) {
((OpenEJBNamingResource) resources).setTomcatResource(false);
}
if (context instanceof StandardContext) {
final StandardContext standardContext = (StandardContext) context;
final NamingContextListener namingContextListener = standardContext.getNamingContextListener();
if (null != namingContextListener) {
namingContextListener.setExceptionOnFailedWrite(standardContext.getJndiExceptionOnFailedWrite());
}
}
}
Aggregations