/** * {@inheritDoc} */ public String getInitialContextFactoryName(String protocolName) { ProtocolConfiguration config = getProtocolConfiguration(protocolName); return config.getProtocol().getInitialContextFactoryClassName(); }
/** * Get the remote object as a stub object for CMI remote object LB * @param remote remote object * @return get remote object * @throws NoSuchObjectException if the clustered object is not found in the CMI registry */ public Remote getRemoteOrRemoteStub(Remote remote) throws NoSuchObjectException { String protocol = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); if (protocol.equals("cmi")) { try { return DistributedEquiv.getExportedStubList(remote); } catch (NoSuchObjectException e) { TraceEjb.interp.log(BasicLevel.DEBUG, "No CMI stub - e=" + e); } } return remote; }
/** * Get the remote object as a stub object for HA remote object LB * @param remote remote object * @return get remote object * @throws RemoteException * @throws ServerConfigException * @throws NoSuchObjectException if the clustered object is not found in the * CMI registry */ public Remote getHARemoteStub(Remote remote, Object primaryKey) throws RemoteException { Remote remo = JRepUtil.getHARemoteStub(remote, dd); String protocol = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); if (protocol.equals("cmi")) { ClusterStub cs = (ClusterStub) remo; DistributorEntityRemote der = (DistributorEntityRemote) cs.getDistrib(); der.setPrimaryKey(primaryKey); } return remo; }
/** * Constructor for the base class of the specific generated Home object. * @param dd The Been Deployment Descriptor * @param bf The Bean Factory * @throws RemoteException exception */ public JHome(BeanDesc dd, JFactory bf) throws RemoteException { if (TraceEjb.isDebugIc()) { TraceEjb.interp.log(BasicLevel.DEBUG, "JHome constructor"); } this.dd = dd; this.bf = bf; // For CMI needs, we have to keep the link between jndiname/classloader String protocol = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); if (protocol.equals("cmi")) { String key = DistributedEquiv.CL_PREFIX + dd.getJndiName(); if (key != null) { // cluster object // register its classloader in the local cache try { DistributedEquiv.putLocalCLByKey(key, bf.getContainer().getClassLoader()); } catch (ServerConfigException e) { throw new RemoteException("", e); } } } }
String protocol = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); if (TraceEjb.interp.isLoggable(BasicLevel.DEBUG)) { TraceEjb.interp.log(BasicLevel.DEBUG, "Current protocol = " + protocol);
String protocol = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); if (TraceEjb.isDebugIc()) { TraceEjb.interp.log(BasicLevel.DEBUG, "Current protocol = " + protocol);
String protocol = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); if (protocol.equals("cmi")) { StubData sd;
String protocol = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); if (protocol.equals("iiop")) { iiopProtocolAvailable = true;
String rmiName = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName();