public void setProperty(String name, Object value) { contextResource.setProperty(name, value); } }
public void setProperty(String name, Object value) { contextResource.setProperty(name, value); } }
resource.setProperty(Constants.FACTORY, ResourceFactory.class.getName()); resource.setProperty(NAME, ref.referenceName); resource.setType(ref.referenceType); resource.setAuth(ref.referenceAuth); resource.setProperty(RESOURCE_ID, ref.resourceID); resource.setProperty(JNDI_NAME, ref.location.jndiName); resource.setProperty(JNDI_PROVIDER_ID, ref.location.jndiProviderId);
resource.setProperty(Constants.FACTORY, PersistenceUnitFactory.class.getName()); resource.setProperty(NAME, ref.referenceName.replaceAll("^comp/env/", "")); resource.setType(EntityManagerFactory.class.getName()); resource.setProperty(UNIT, ref.persistenceUnitName); resource.setProperty(JNDI_NAME, ref.location.jndiName); resource.setProperty(JNDI_PROVIDER_ID, ref.location.jndiProviderId); } else {
resource.setProperty(Constants.FACTORY, ResourceFactory.class.getName()); resource.setProperty(NAME, ref.referenceName.replaceAll("^comp/env/", "")); resource.setType(ref.referenceType); resource.setAuth(ref.referenceAuth); resource.setProperty(RESOURCE_ID, ref.resourceID); resource.setProperty(JNDI_NAME, ref.location.jndiName); resource.setProperty(JNDI_PROVIDER_ID, ref.location.jndiProviderId);
resource.setProperty(Constants.FACTORY, PersistenceUnitFactory.class.getName()); resource.setProperty(NAME, ref.referenceName); resource.setType(EntityManagerFactory.class.getName()); resource.setProperty(UNIT, ref.persistenceUnitName); resource.setProperty(JNDI_NAME, ref.location.jndiName); resource.setProperty(JNDI_PROVIDER_ID, ref.location.jndiProviderId); } else {
public ContextResource getContextResource(ClassLoader cl) { ContextResource contextResource = new ContextResource(); contextResource.setAuth(getAuth()); contextResource.setScope(getScope()); contextResource.setDescription(getDescription()); contextResource.setName(getName()); contextResource.setType(getType()); for (Map.Entry<QName, String> entry: getOtherAttributes().entrySet()) { String propertyName = entry.getKey().getLocalPart(); contextResource.setProperty(propertyName, entry.getValue()); } return contextResource; }
resource.setProperty(Constants.FACTORY, PersistenceContextFactory.class.getName()); resource.setProperty(NAME, ref.referenceName); resource.setType(EntityManager.class.getName()); resource.setProperty(UNIT, ref.persistenceUnitName); resource.setProperty(EXTENDED, "" + ref.extended); if (ref.properties != null) { resource.setProperty(JNDI_NAME, ref.location.jndiName); resource.setProperty(JNDI_PROVIDER_ID, ref.location.jndiProviderId); } else { Context context = SystemInstance.get().getComponent(ContainerSystem.class).getJNDIContext();
resource.setProperty(Constants.FACTORY, PersistenceContextFactory.class.getName()); resource.setProperty(NAME, ref.referenceName.replaceAll("^comp/env/", "")); resource.setType(EntityManager.class.getName()); resource.setProperty(UNIT, ref.persistenceUnitName); resource.setProperty(EXTENDED, "" + ref.extended); if (ref.properties != null) { resource.setProperty(JNDI_NAME, ref.location.jndiName); resource.setProperty(JNDI_PROVIDER_ID, ref.location.jndiProviderId); } else { Context context = SystemInstance.get().getComponent(ContainerSystem.class).getJNDIContext();
resource.setProperty(Constants.FACTORY, WsFactory.class.getName()); resource.setProperty(NAME, ref.referenceName.replaceAll("^comp/env/", "")); if (ref.referenceType != null) { resource.setType(ref.referenceType); resource.setProperty(JNDI_NAME, ref.location.jndiName); resource.setProperty(JNDI_PROVIDER_ID, ref.location.jndiProviderId); } else { resource.setProperty(WS_ID, ref.id); resource.setProperty(WS_QNAME, ref.serviceQName.toString()); resource.setProperty(WS_CLASS, ref.serviceType); resource.setProperty(WS_PORT_QNAME, ref.portQName.toString()); resource.setProperty(WSDL_URL, wsdlURL.toString());
resource.setProperty(Constants.FACTORY, WsFactory.class.getName()); resource.setProperty(NAME, ref.referenceName); if (ref.referenceType != null) { resource.setType(ref.referenceType); resource.setProperty(JNDI_NAME, ref.location.jndiName); resource.setProperty(JNDI_PROVIDER_ID, ref.location.jndiProviderId); } else { resource.setProperty(WS_ID, ref.id); resource.setProperty(WS_QNAME, ref.serviceQName.toString()); resource.setProperty(WS_CLASS, ref.serviceType); resource.setProperty(WS_PORT_QNAME, ref.portQName.toString()); resource.setProperty(WSDL_URL, wsdlURL.toString());
cr.setType((String)value); } else { cr.setProperty(name, ""+value);
cr.setType((String)value); } else { cr.setProperty(name, ""+value);
cr.setType((String)value); } else { cr.setProperty(name, ""+value);
cr.setType((String)value); } else { cr.setProperty(name, ""+value);
cr.setType((String)value); } else { cr.setProperty(name, ""+value);
cr.setType((String)value); } else { cr.setProperty(name, ""+value);
resource.setProperty("mappedName", annotation.mappedName()); resource.setDescription(annotation.description());
resource.setProperty("mappedName", annotation.mappedName()); resource.setDescription(annotation.description());
private void addWeldBeanManager(StandardContext appContext) { ContextResource resource = new ContextResource(); resource.setAuth("Container"); resource.setName(BEAN_MANAGER_NAME); resource.setType(BEAN_MANAGER_TYPE); resource.setProperty("factory", WELD_MANAGER_FACTORY); appContext.getNamingResources().addResource(resource); ContextResourceEnvRef resourceRef = new ContextResourceEnvRef(); resourceRef.setName(BEAN_MANAGER_NAME); resourceRef.setType(BEAN_MANAGER_TYPE); appContext.getNamingResources().addResourceEnvRef(resourceRef); appContext.addApplicationListener(WELD_SERVLET_LISTENER); }