public JBossSessionBeanDescriptorAdaptor(JBossSessionBeanMetaData sessionBeanMetaData, DeploymentUnit deploymentUnit, EjbReferenceResolver resolver) { this(sessionBeanMetaData, deploymentUnit, resolver, sessionBeanMetaData.getLocalJndiName()); }
public JBossSessionBeanDescriptorAdaptor(JBossSessionBeanMetaData sessionBeanMetaData, DeploymentUnit deploymentUnit, EjbReferenceResolver resolver) { this(sessionBeanMetaData, deploymentUnit, resolver, sessionBeanMetaData.getLocalJndiName()); }
/** * Determine the localJndiName. * * @return the localJndiName. * @deprecated JBMETA-68 */ @Deprecated @Override public String determineLocalJndiName() { if (getLocalJndiName() != null) return getLocalJndiName(); if(home == null && jndiName != null) return jndiName; String ejbName = getEjbName(); return "local/" + ejbName + '@' + System.identityHashCode(ejbName); }
@Override public String getContainerObjectNameJndiName() { boolean remote = false; if (getHome() != null) remote = true; return remote ? getJndiName() : getLocalJndiName(); }
@Override public String getContainerObjectNameJndiName() { boolean remote = false; if (getHome() != null) remote = true; return remote ? determineJndiName() : getLocalJndiName(); }
/** * Returns the resolved JNDI target to which the * default EJB3.x Local Business interfaces are to be bound * * @return */ public String determineResolvedLocalBusinessDefaultJndiName(){ String s = delegate.getLocalJndiName(); if (s != null && s.length() > 0) return s; return getJndiPolicy().getJndiName(getEjbDeploymentSummary(), KnownInterfaces.LOCAL, KnownInterfaceType.BUSINESS_LOCAL); }
public String getDefaultLocalJndiName(EjbDeploymentSummary summary) { JBossEnterpriseBeanMetaData beanMD = summary.getBeanMD(); String name = null; if(beanMD instanceof JBossSessionBeanMetaData) { JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD; name = sbeanMD.getLocalJndiName(); } if(name == null) { name = beanMD.getLocalJndiName(); } return name; }
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); } } }
private static String getLocalJndiName(EJBContainer container, boolean conflictCheck) { // See if local binding is explicitly-defined LocalBinding localBinding = container.getAnnotation(LocalBinding.class); // If none specified if (localBinding == null || (localBinding.jndiBinding() != null && localBinding.jndiBinding().trim().length() == 0)) { JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml(); String name = smd.getLocalJndiName(); // If we should check for naming conflict if (conflictCheck){ // Check ProxyFactoryHelper.checkForJndiNamingConflict(container); } // Return return name; } // Local Binding was explicitly-specified, use it else { return localBinding.jndiBinding(); } }
protected SessionProxyFactory getProxyFactory(LocalBinding binding) { assert binding!=null : LocalBinding.class.getSimpleName() + " must be specified"; // Find the jndiName String jndiName = this.getMetaData().getLocalJndiName(); if(binding!=null) { jndiName = binding.jndiBinding(); } // Get the Registry name String proxyFactoryRegistryBindName = this.getJndiRegistrar().getProxyFactoryRegistryKey(jndiName, this.getMetaData(), true); // Return return this.getProxyFactory(proxyFactoryRegistryBindName); }
jndiName = smd.getLocalJndiName();
String jndiName = !isRemote ? smd.getLocalJndiName() : smd.getJndiName();
private void addLocalJndiAnnotations(EJBContainer container, JBossSessionBeanMetaData enterpriseBean) throws ClassNotFoundException { String localJndiName = enterpriseBean.getLocalJndiName(); if (localJndiName != null) { LocalBindingImpl localBinding = new LocalBindingImpl(localJndiName); addClassAnnotation(container, LocalBinding.class, localBinding); } String localHomeJndiName = enterpriseBean.getLocalHomeJndiName(); if (localHomeJndiName != null) { LocalHomeBindingImpl localHomeBinding = new LocalHomeBindingImpl(localHomeJndiName); addClassAnnotation(container, LocalHomeBinding.class, localHomeBinding); } }
jndiName = smd.getLocalJndiName();
/** * 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 = isLocal ? smd.getLocalJndiName() : smd.getJndiName();
String jndiName = isLocal ? smd.getLocalJndiName() : smd.getJndiName();