/** * Obtains the JndiSessionRegistrarBase from MC, null if not found * * @return */ protected JndiSessionRegistrarBase getJndiRegistrar() { // If defined already, use it if (this.jndiRegistrar != null) { return this.jndiRegistrar; } // Initialize String jndiRegistrarBindName = this.getJndiRegistrarBindName(); // Obtain Registrar Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar(); // Lookup Object obj = null; try { obj = registrar.lookup(jndiRegistrarBindName); this.setJndiRegistrar(jndiRegistrar); } // If not installed, warn and return null catch (NotBoundException e) { log.warn( "No " + JndiSessionRegistrarBase.class.getName() + " was found installed in the ObjectStore (Registry) at " + jndiRegistrarBindName); return null; } // Cast JndiSessionRegistrarBase jndiRegistrar = (JndiSessionRegistrarBase) obj; // Return return jndiRegistrar; }
/** * This gets called by replicants manager interceptor factory during the initialization of the * bean container (during construction of EJBContainer). So we have detached construction here. * * @return the cluster families, never null */ public Map<String, HATarget> getClusterFamilies() { if (clusterFamilies == null) { Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar(); ProxyClusteringRegistry registry = (ProxyClusteringRegistry) registrar.lookup( ClusteredObjectStoreBindings .CLUSTERED_OBJECTSTORE_BEAN_NAME_PROXY_CLUSTERING_REGISTRY); clusterFamilies = registry.getHATargets(this.getObjectName().getCanonicalName()); } return clusterFamilies; }