private Set<String> getStubClasses(ClassLoader jcl, EjbBundleDescriptor ejbBundle) throws IOException, ClassNotFoundException { Set<String> stubClasses = new HashSet<String>(); for (Iterator iter = ejbBundle.getEjbs().iterator(); iter.hasNext();) { EjbDescriptor desc = (EjbDescriptor) iter.next(); if( desc.isRemoteInterfacesSupported() ) { String home = desc.getHomeClassName(); String remote = desc.getRemoteClassName(); stubClasses.add(home); Set homeSuperIntfs = getRemoteSuperInterfaces(jcl, home); stubClasses.addAll(homeSuperIntfs); stubClasses.add(remote); Set remoteSuperIntfs = getRemoteSuperInterfaces(jcl, remote); stubClasses.addAll(remoteSuperIntfs); } } return stubClasses; }
private Set<String> getStubClasses(ClassLoader jcl, EjbBundleDescriptor ejbBundle) throws IOException, ClassNotFoundException { Set<String> stubClasses = new HashSet<String>(); for (Iterator iter = ejbBundle.getEjbs().iterator(); iter.hasNext();) { EjbDescriptor desc = (EjbDescriptor) iter.next(); if( desc.isRemoteInterfacesSupported() ) { String home = desc.getHomeClassName(); String remote = desc.getRemoteClassName(); stubClasses.add(home); Set homeSuperIntfs = getRemoteSuperInterfaces(jcl, home); stubClasses.addAll(homeSuperIntfs); stubClasses.add(remote); Set remoteSuperIntfs = getRemoteSuperInterfaces(jcl, remote); stubClasses.addAll(remoteSuperIntfs); } } return stubClasses; }
/** * Returns the full set of method descriptors I have (from all the methods on my home and remote interfaces). */ public Set getMethodDescriptors() { ClassLoader classLoader = getEjbBundleDescriptor().getClassLoader(); Set methods = getBusinessMethodDescriptors(); try { if (isRemoteInterfacesSupported()) { addAllInterfaceMethodsIn(methods, classLoader.loadClass(getHomeClassName()), MethodDescriptor.EJB_HOME); } if (isLocalInterfacesSupported()) { addAllInterfaceMethodsIn(methods, classLoader.loadClass(getLocalHomeClassName()), MethodDescriptor.EJB_LOCALHOME); } } catch (Throwable t) { _logger.log(Level.SEVERE, "enterprise.deployment.backend.methodClassLoadFailure", new Object[]{"(EjbDescriptor.getMethods())"}); throw new RuntimeException(t); } return methods; }
EjbDescriptor ejbDesc) { Set methodAlls = new HashSet(); if (ejbDesc.isRemoteInterfacesSupported() || ejbDesc.isRemoteBusinessInterfacesSupported()) { methodAlls.add( new MethodDescriptor(MethodDescriptor.ALL_METHODS, "", MethodDescriptor.EJB_REMOTE)); if (ejbDesc.isRemoteInterfacesSupported()) { methodAlls.add( new MethodDescriptor(MethodDescriptor.ALL_METHODS,
EjbDescriptor ejbDesc) { Set methodAlls = new HashSet(); if (ejbDesc.isRemoteInterfacesSupported() || ejbDesc.isRemoteBusinessInterfacesSupported()) { methodAlls.add( new MethodDescriptor(MethodDescriptor.ALL_METHODS, "", MethodDescriptor.EJB_REMOTE)); if (ejbDesc.isRemoteInterfacesSupported()) { methodAlls.add( new MethodDescriptor(MethodDescriptor.ALL_METHODS,
/** * Set runtime default value for EjbDescriptor. */ private void computeRuntimeDefault(EjbDescriptor ejb) { String intfName = null; if ((ejb.getJndiName() == null) || (ejb.getJndiName().length() == 0)) { if (ejb.isRemoteInterfacesSupported() && ejb.isRemoteBusinessInterfacesSupported()) { // can't use a default. } else if (ejb.isRemoteInterfacesSupported()) { // For 2.x view, use the Home as the basis for the default intfName = ejb.getHomeClassName(); } else if (ejb.isRemoteBusinessInterfacesSupported()) { Set<String> classNames = ejb.getRemoteBusinessClassNames(); if (classNames.size() == 1) { intfName = (String)classNames.iterator().next(); } } } if( intfName != null ) { String jndiName = getDefaultEjbJndiName(intfName); ejb.setJndiName(jndiName); } if (!ejb.getUsesCallerIdentity()) { computeRunAsPrincipalDefault( ejb.getRunAsIdentity(), ejb.getApplication()); } }
if (isRemoteInterfacesSupported()) { addAllInterfaceMethodsIn(methods, classLoader.loadClass(getRemoteClassName()), MethodDescriptor.EJB_REMOTE);
if (ejbDescriptor.isRemoteInterfacesSupported()) { addAllInterfaceMethodsIn(methods, classLoader.loadClass(ejbDescriptor.getHomeClassName())); addAllInterfaceMethodsIn(methods, classLoader.loadClass(ejbDescriptor.getRemoteClassName()));
if (ejbDescriptor.isRemoteInterfacesSupported()) { addAllInterfaceMethodsIn(methods, classLoader.loadClass(ejbDescriptor.getHomeClassName())); addAllInterfaceMethodsIn(methods, classLoader.loadClass(ejbDescriptor.getRemoteClassName()));
/** * Sets the ejb descriptor to which I refer. * @param ejbDescriptor the ejb descriptor referenced, null if it is unknow at this time */ public void setEjbDescriptor(EjbDescriptor ejbDescriptor) { if (this.ejbDescriptor != null) { this.ejbDescriptor.removeEjbReferencer(this); // remove previous referencer } this.ejbDescriptor=ejbDescriptor; if (ejbDescriptor!=null) { ejbDescriptor.addEjbReferencer(this); if (isLocal()) { if (!ejbDescriptor.isLocalInterfacesSupported() && !ejbDescriptor.isLocalBusinessInterfacesSupported() && !ejbDescriptor.isLocalBean()) { throw new RuntimeException(localStrings.getLocalString( "entreprise.deployment.invalidLocalInterfaceReference", "Trying to set an ejb-local-ref on an EJB while the EJB does not define local interfaces")); } } else { if (!ejbDescriptor.isRemoteInterfacesSupported() && !ejbDescriptor.isRemoteBusinessInterfacesSupported()) { throw new RuntimeException(localStrings.getLocalString( "entreprise.deployment.invalidRemoteInterfaceReference", "Trying to set an ejb-ref on an EJB, while the EJB does not define remote interfaces")); } } } }
if( ejbDescriptor.isRemoteInterfacesSupported() ) { Class homeClass = classloader.loadClass (ejbDescriptor.getHomeClassName()); if( ejbDescriptor.isRemoteInterfacesSupported() ) { try { Class cl = classloader.loadClass(
/** * Sets the ejb descriptor to which I refer. * @param ejbDescriptor the ejb descriptor referenced, null if it is unknown at this time */ @Override public void setEjbDescriptor(EjbDescriptor ejbDescriptor) { if (this.ejbDescriptor != null) { this.ejbDescriptor.removeEjbReferencer(this); // remove previous referencer } this.ejbDescriptor=ejbDescriptor; if (ejbDescriptor!=null) { ejbDescriptor.addEjbReferencer(this); if (isLocal()) { if (!ejbDescriptor.isLocalInterfacesSupported() && !ejbDescriptor.isLocalBusinessInterfacesSupported() && !ejbDescriptor.isLocalBean()) { throw new RuntimeException(localStrings.getLocalString( "entreprise.deployment.invalidLocalInterfaceReference", "Trying to set an ejb-local-ref on an EJB while the EJB [{0}] does not define local interfaces", new Object[] {ejbDescriptor.getName()})); } } else { if (!ejbDescriptor.isRemoteInterfacesSupported() && !ejbDescriptor.isRemoteBusinessInterfacesSupported()) { throw new RuntimeException(localStrings.getLocalString( "entreprise.deployment.invalidRemoteInterfaceReference", "Trying to set an ejb-ref on an EJB, while the EJB [{0}] does not define remote interfaces", new Object[] {ejbDescriptor.getName()})); } } } }
if( next.isRemoteInterfacesSupported() ) { addIntfInfo(intfInfoMap, next.getHomeClassName(), EjbIntfType.REMOTE_HOME, next);
EjbDescriptor next = (EjbDescriptor) iter.next(); if( next.isRemoteInterfacesSupported() ) { addIntfInfo(intfInfoMap, next.getHomeClassName(), EjbIntfType.REMOTE_HOME, next);
if (ejbDescriptor.isRemoteInterfacesSupported()) { Collection disallowedMethods = extractDisallowedMethodsFor(javax.ejb.EJBObject.class, sessionBeanMethodsDisallowed); Collection potentials = getTransactionMethodsFor(loader, ejbDescriptor.getRemoteClassName() , disallowedMethods);
if( ejbDescriptor.isRemoteInterfacesSupported() ) { Class homeClass = classloader.loadClass (ejbDescriptor.getHomeClassName()); if( ejbDescriptor.isRemoteInterfacesSupported() ) { try { Class cl = classloader.loadClass(
getEJBLocalObjectForPrimaryKey(primaryKey); if( ejbDescriptor.isRemoteInterfacesSupported() ) { newRobInfo.cachedEjbObject = getEJBObjectStub(primaryKey, null);
if (ejb.isRemoteInterfacesSupported()) { String intf = ejb.getHomeClassName(); String fullyQualifiedJavaGlobalName = javaGlobalName + "!" + intf; if(glassfishSpecificJndiName != null && !ejb.isRemoteInterfacesSupported() && count == 1) { appResources.storeInNamespace(glassfishSpecificJndiName, ejb);
if ( ejbDescriptor.isRemoteInterfacesSupported() || ejbDescriptor.isRemoteBusinessInterfacesSupported() ) { if ( ejbDescriptor.isRemoteInterfacesSupported() ) {