private void quickCheckIfOldDeploymentShouldBeUsedFromEjbConfig(final AppInfo appInfo) { // if forced don't update anything if (appInfo.properties.getProperty(OPENEJB_USE_APPLICATION_PROPERTY) != null) { return; } for (final EjbJarInfo ejbJar : appInfo.ejbJars) { for (final EnterpriseBeanInfo bean : ejbJar.enterpriseBeans) { if (bean.restService) { final BeanContext beanContext = containerSystem.getBeanContext(bean.ejbDeploymentId); if (beanContext == null) { // ear continue; } if (containsJaxRsConfiguration(beanContext.getProperties())) { appInfo.properties.setProperty(OPENEJB_USE_APPLICATION_PROPERTY, "false"); logOldDeploymentUsage(bean.ejbClass); return; // no need to look further } } } } }
public void begin(final BeanContext bean) { this.bean = bean; final EnterpriseBeanInfo beanInfo = beanInfos.get(bean.getDeploymentID()); templates = new HashMap<String, Map<String, StringTemplate>>(); templates.put("", addTemplate(null, DEFAULT_NAME_KEY, template)); for (final JndiNameInfo nameInfo : beanInfo.jndiNamess) { String intrface = nameInfo.intrface; if (intrface == null) { intrface = ""; } templates.put(intrface, addTemplate(templates.get(intrface), getType(nameInfo.name), new StringTemplate(nameInfo.name))); } beanInfo.jndiNames.clear(); beanInfo.jndiNamess.clear(); this.beanContext = new HashMap<String, String>(appContext); putAll(this.beanContext, bean.getProperties()); this.beanContext.put("ejbType", bean.getComponentType().name()); this.beanContext.put("ejbClass", bean.getBeanClass().getName()); this.beanContext.put("ejbClass.simpleName", bean.getBeanClass().getSimpleName()); this.beanContext.put("ejbClass.packageName", packageName(bean.getBeanClass())); this.beanContext.put("ejbName", bean.getEjbName()); this.beanContext.put("deploymentId", bean.getDeploymentID().toString()); }
public void begin(final BeanContext bean) { this.bean = bean; final EnterpriseBeanInfo beanInfo = beanInfos.get(bean.getDeploymentID()); templates = new HashMap<String, Map<String, StringTemplate>>(); templates.put("", addTemplate(null, DEFAULT_NAME_KEY, template)); for (final JndiNameInfo nameInfo : beanInfo.jndiNamess) { String intrface = nameInfo.intrface; if (intrface == null) { intrface = ""; } templates.put(intrface, addTemplate(templates.get(intrface), getType(nameInfo.name), new StringTemplate(nameInfo.name))); } beanInfo.jndiNames.clear(); beanInfo.jndiNamess.clear(); this.beanContext = new HashMap<String, String>(appContext); putAll(this.beanContext, bean.getProperties()); this.beanContext.put("ejbType", bean.getComponentType().name()); this.beanContext.put("ejbClass", bean.getBeanClass().getName()); this.beanContext.put("ejbClass.simpleName", bean.getBeanClass().getSimpleName()); this.beanContext.put("ejbClass.packageName", packageName(bean.getBeanClass())); this.beanContext.put("ejbName", bean.getEjbName()); this.beanContext.put("deploymentId", bean.getDeploymentID().toString()); }
private void deployEJB(final String web, final String context, final BeanContext beanContext, final Collection<Object> additionalProviders, final Collection<ServiceInfo> serviceInfos) { final String nopath = getAddress(context, beanContext.getBeanClass()); final RsHttpListener listener = createHttpListener(); final RsRegistry.AddressInfo address = rsRegistry.createRsHttpListener(web, listener, beanContext.getClassLoader(), nopath.substring(NOPATH_PREFIX.length() - 1), virtualHost, auth, realm); services.add(new DeployedService(address.complete, context, beanContext.getBeanClass().getName())); listener.deployEJB(context, getFullContext(address.base, context), beanContext, additionalProviders, new ServiceConfiguration(beanContext.getProperties(), serviceInfos)); LOGGER.info("REST Service: " + address.complete + " -> EJB " + beanContext.getEjbName()); }
final PortData port = WsBuilder.toPortData(portInfo, beanContext.getInjections(), moduleBaseUrl, beanContext.getClassLoader()); final HttpListener container = createEjbWsContainer(moduleBaseUrl, port, beanContext, new ServiceConfiguration(beanContext.getProperties(), appInfo.services));
final PortData port = WsBuilder.toPortData(portInfo, beanContext.getInjections(), moduleBaseUrl, beanContext.getClassLoader()); final HttpListener container = createEjbWsContainer(moduleBaseUrl, port, beanContext, new ServiceConfiguration(beanContext.getProperties(), appInfo.services));
ctx.getJndiContext(), containerSystem.getAppContext(appInfo.appId).getWebBeansContext(), providers, new ServiceConfiguration(ctx.getProperties(), appInfo.services)); } else { deployEJB("", ejb.getValue().path, ctx, providers, appInfo.services);
log.info("createApplication.createdEjb" + deployment.getDeploymentID() + deployment.getEjbName() + container.getContainerID()); if (log.isDebugEnabled()) { for (Map.Entry<Object, Object> entry : deployment.getProperties().entrySet()) { log.info("createApplication.createdEjb.property" + deployment.getEjbName() + entry.getKey() + entry.getValue());
for (final Map.Entry<Object, Object> entry : deployment.getProperties().entrySet()) { logger.info("createApplication.createdEjb.property", deployment.getEjbName(), entry.getKey(), entry.getValue());
for (final Map.Entry<Object, Object> entry : deployment.getProperties().entrySet()) { logger.info("createApplication.createdEjb.property", deployment.getEjbName(), entry.getKey(), entry.getValue());
private EJBMetaDataImpl buildEjbMetaData(final ProxyInfo info, final BeanContext beanContext, final int idCode) { final EJBMetaDataImpl eMetaData = new EJBMetaDataImpl(beanContext.getHomeInterface(), beanContext.getRemoteInterface(), beanContext.getPrimaryKeyClass(), beanContext.getComponentType().toString(), beanContext.getDeploymentID().toString(), idCode, convert(info.getInterfaceType()), info.getInterfaces(), beanContext.getAsynchronousMethodSignatures()); eMetaData.loadProperties(beanContext.getProperties()); return eMetaData; } }
quartzProps += putAll(properties, deployment.getModuleContext().getAppContext().getProperties()); quartzProps += putAll(properties, deployment.getModuleContext().getProperties()); quartzProps += putAll(properties, deployment.getProperties());
final Options options = new Options(beanContext.getProperties()); final int instanceLimit = options.get("InstanceLimit", this.instanceLimit);
quartzProps += putAll(properties, deployment.getModuleContext().getAppContext().getProperties()); quartzProps += putAll(properties, deployment.getModuleContext().getProperties()); quartzProps += putAll(properties, deployment.getProperties());
final Options options = new Options(beanContext.getProperties()); final int instanceLimit = options.get("InstanceLimit", this.instanceLimit);
deployment.getProperties().putAll(bean.properties);
@Override public Object getBusinessObject(final ProxyInfo info) { final CallContext call = CallContext.getCallContext(); final BeanContext beanContext = info.getBeanContext(); final int idCode = -1; Object securityIdentity = null; try { securityIdentity = call.getEJBRequest().getClientIdentity(); } catch (final Exception e) { e.printStackTrace(); } final ClientMetaData cMetaData = new ClientMetaData(securityIdentity); final EJBMetaDataImpl eMetaData = new EJBMetaDataImpl(null, null, beanContext.getPrimaryKeyClass(), beanContext.getComponentType().toString(), beanContext.getDeploymentID().toString(), idCode, convert(info.getInterfaceType()), info.getInterfaces(), beanContext.getAsynchronousMethodSignatures()); eMetaData.loadProperties(beanContext.getProperties()); final Object primKey = info.getPrimaryKey(); final EJBObjectHandler hanlder = EJBObjectHandler.createEJBObjectHandler(JNDIContext.globalExecutor(), eMetaData, getServerMetaData(), cMetaData, primKey, null); return hanlder.createEJBObjectProxy(); }
recipe.allow(Option.CASE_INSENSITIVE_PROPERTIES); recipe.allow(Option.IGNORE_MISSING_PROPERTIES); recipe.setAllProperties(beanContext.getProperties()); final Options options = new Options(beanContext.getProperties());
@SuppressWarnings("unchecked") public void deploy(final BeanContext beanContext) throws OpenEJBException { final Options options = new Options(beanContext.getProperties()); recipe.allow(Option.CASE_INSENSITIVE_PROPERTIES); recipe.allow(Option.IGNORE_MISSING_PROPERTIES); recipe.setAllProperties(beanContext.getProperties()); final Pool.Builder builder = (Pool.Builder) recipe.create();
@SuppressWarnings("unchecked") public void deploy(final BeanContext beanContext) throws OpenEJBException { final Options options = new Options(beanContext.getProperties()); recipe.allow(Option.CASE_INSENSITIVE_PROPERTIES); recipe.allow(Option.IGNORE_MISSING_PROPERTIES); recipe.setAllProperties(beanContext.getProperties()); final Pool.Builder builder = (Pool.Builder) recipe.create();