@Override protected String getDefaultInvokerJndiName() { return getJndiName(); }
public static String getDefaultRemoteBusinessJndiName(EJBContainer container) { JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml(); String jndiName = smd.getJndiName(); return jndiName; } }
@Override public String getContainerObjectNameJndiName() { boolean remote = false; if (getHome() != null) remote = true; return remote ? getJndiName() : getLocalJndiName(); }
@Override public String getMappedName() { // Obtain remote bindings List<RemoteBindingMetaData> bindings = this.delegate.getRemoteBindings(); // If defined, use the first remote binding as a JNDI default if (bindings != null && bindings.size() > 0) { String jndiName = bindings.get(0).getJndiName(); if (jndiName != null && jndiName.length() > 0) { return jndiName; } } // Try the mapped-name String s = delegate.getMappedName(); if (s != null && s.length() > 0) return s; // Try explicit jndi-name s = delegate.getJndiName(); if (s != null && s.length() > 0) return s; // Delegate out to the policy; not explicitly-defined here return getJndiPolicy().getJndiName(getEjbDeploymentSummary(), KnownInterfaces.REMOTE, KnownInterfaceType.BUSINESS_REMOTE); }
private static void checkForJndiNamingConflict(EJBContainer container) { if (container.getAnnotation(Local.class) != null) { JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml(); String localJndiName = smd.getLocalJndiName(); String remoteJndiName = smd.getJndiName(); String ejbName = container.getEjbName(); if (localJndiName != null) { if (localJndiName.equals(remoteJndiName) || localJndiName.startsWith(remoteJndiName + "/")) throw new javax.ejb.EJBException("Conflict between default jndi name " + remoteJndiName + " for both remote and local for ejb-name:" + ejbName + ", bean class=" + container.getBeanClass() + "\nLocal JNDI Name: " + localJndiName + "\nRemote JNDI Name: " + remoteJndiName); } } }
public String getDefaultRemoteJndiName(EjbDeploymentSummary summary) { JBossEnterpriseBeanMetaData beanMD = summary.getBeanMD(); String name = null; if(beanMD instanceof JBossSessionBeanMetaData) { JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD; name = sbeanMD.getJndiName(); if(name == null) name = sbeanMD.getMappedName(); if(name == null && sbeanMD.getRemoteBindings() != null && sbeanMD.getRemoteBindings().size() > 0) name = sbeanMD.getRemoteBindings().get(0).getJndiName(); } if(name == null) { name = beanMD.getEjbName() + "Remote"; } return name; }
mappedName = smd.getJndiName();
String jndiName = !isRemote ? smd.getLocalJndiName() : smd.getJndiName();
jndiName = smd.getJndiName();
jndiName = smd.getJndiName();
public String getDefaultRemoteHomeJndiName(EjbDeploymentSummary summary) { JBossEnterpriseBeanMetaData beanMD = summary.getBeanMD(); String name = null; if(beanMD instanceof JBossSessionBeanMetaData) { JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD; name = sbeanMD.getHomeJndiName(); if (name == null) name = sbeanMD.getJndiName(); if(name == null) name = sbeanMD.getMappedName(); if(name == null && sbeanMD.getRemoteBindings() != null && sbeanMD.getRemoteBindings().size() > 0) name = sbeanMD.getRemoteBindings().get(0).getJndiName(); } if(name == null) { name = beanMD.getEjbName() + "Remote"; } return name; }
public String getJndiName(EjbDeploymentSummary summary) { JBossEnterpriseBeanMetaData beanMD = summary.getBeanMD(); String name = null; if(beanMD instanceof JBossSessionBeanMetaData) { JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD; name = sbeanMD.getHomeJndiName(); if (name == null) name = sbeanMD.getJndiName(); if(name == null) name = sbeanMD.getMappedName(); if(name == null && sbeanMD.getRemoteBindings() != null && sbeanMD.getRemoteBindings().size() > 0) name = sbeanMD.getRemoteBindings().get(0).getJndiName(); } if(name == null) { name = beanMD.getEjbName(); } return name; } /**
/** * A direct copy out of LegacyStatefulBusinessObjectFactory */ protected <B> B createLegacyBusinessObject(SessionContainer container, Serializable sessionId, Class<B> businessInterface, ViewType type) { boolean isRemote = type == ViewType.REMOTE; // Obtain SFSB JNDI Registrar String sfsbJndiRegistrarObjectStoreBindName = ((StatefulContainer) container).getJndiRegistrarBindName(); JndiStatefulSessionRegistrar sfsbJndiRegistrar = Ejb3RegistrarLocator.locateRegistrar().lookup( sfsbJndiRegistrarObjectStoreBindName, JndiStatefulSessionRegistrar.class); // Get the metadata JBossSessionBeanMetaData smd = container.getMetaData(); // Get the appropriate JNDI Name String jndiName = !isRemote ? smd.getLocalJndiName() : smd.getJndiName(); // Find the Proxy Factory Key for this SFSB String proxyFactoryKey = sfsbJndiRegistrar.getProxyFactoryRegistryKey(jndiName, smd, !isRemote); // Lookup the Proxy Factory in the Object Store StatefulSessionProxyFactory proxyFactory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey, StatefulSessionProxyFactory.class); // Create a new business proxy Object proxy = proxyFactory.createProxyBusiness(sessionId, businessInterface.getName()); // Return the Proxy return businessInterface.cast(proxy); }
String jndiName = isLocal ? smd.getLocalJndiName() : smd.getJndiName();
String jndiName = enterpriseBean.getJndiName(); if (jndiName != null && !jndiName.trim().equals(""))
String givenJndiName = sbeanMD.getJndiName(); if(givenJndiName != null && givenJndiName.trim().length() > 0) hasJndiName = true;
String jndiName = container.getMetaData().getJndiName(); log.debug("default remote binding has jndiName of " + jndiName); String uri = ""; // use the default
String jndiName = isLocal ? smd.getLocalJndiName() : smd.getJndiName();
String jndiName = isLocal ? smd.getLocalJndiName() : smd.getJndiName();
if(joverride != null && joverride.getJndiName() != null) jndiName = joverride.getJndiName();