Project p = new Project(); Application a = new Application(); a.setProject(p); p.getApplications().add(a); em.persist(p);
mc.setMessageListener(new MessageListener() { public void onMessage(Message msg) { ... } });
return new Application(); }; }());
@Override public boolean getKeepState() { // for standalone module, get the keep-state value specified in // module glassfish-*.xml if (isVirtual()) { BundleDescriptor bundleDesc = getStandaloneBundleDescriptor(); if (bundleDesc != null) { return bundleDesc.getKeepState(); } } return super.getKeepState(); }
/** * Adds a new abstract role */ public void addRole(Role role) { for (WebBundleDescriptor wbd : getWebBundleDescriptors()) { wbd.addRole(role); } for (EjbBundleDescriptor ejbd : getEjbBundleDescriptors()) { ejbd.addRole(role); } }
private BundleDescriptor getBundleDescriptor() { return ownedByMessageDestinationRef() ? ownerMsgDestRef.getReferringBundleDescriptor() : ownerMsgBean.getEjbBundleDescriptor(); }
/** * set connection intf */ public void setConnectionImpl(String con) { getConnectionDef().setConnectionImpl(con); }
/** * Return the rolename. * @return the role name. */ public SecurityRole getSecurityRoleLink() { return new SecurityRoleDescriptor(super.getValue(), ""); }
protected void authenticate() throws IOException, XMPPException { getSASLAuthentication().send(new AuthMechanism(NAME, ""));
/** * @return the absolute path of the root of this persistence unit * @see #getPuRoot() * @see PersistenceUnitsDescriptor#getAbsolutePuRoot() */ public String getAbsolutePuRoot() { return getParent().getAbsolutePuRoot(); }
/** * Set of EnvironmentProperty */ public Set getConfigProperties() { return getConnectionDef().getConfigProperties(); }
/** * Get connection factory impl */ public String getConnectionFactoryImpl() { return getConnectionDef().getConnectionFactoryImpl(); }
/** * set connection intf */ public void setConnectionIntf(String con) { getConnectionDef().setConnectionIntf(con); }
/** * Adds a role to the authorization constraint * @param the role name to be added */ public void addSecurityRole(String roleName) { SecurityRoleDescriptor sr = new SecurityRoleDescriptor(); sr.setName(roleName); addSecurityRole(sr); }
/** * Get connection factory intf */ public String getConnectionFactoryIntf() { return getConnectionDef().getConnectionFactoryIntf(); }
/** * Validate descriptor is already defined or not. * @param reference * @return */ private boolean isDescriptorRegistered(ResourceDescriptor reference) { ResourceDescriptor descriptor = getResourcesDescriptor(reference.getName()); if (descriptor != null) { return true; } return false; }
@Override public InjectionInfo getInjectionInfoByClass(Class clazz) { if (env != null) return env.getInjectionInfoByClass(clazz); else return bundleDescriptor.getInjectionInfoByClass(clazz, this); }
@Override public final Set<ResourceDescriptor> getResourceDescriptors(JavaEEResourceType type) { if (env != null) return env.getResourceDescriptors(type); else return super.getResourceDescriptors(type); }
/** * set connection intf */ public void setConnectionImpl(String con) { getConnectionDef().setConnectionImpl(con); }
getSASLAuthentication().send(new AuthMechanism(NAME, ""));