Examples of RegistryContext


Examples of com.sun.jndi.rmi.registry.RegistryContext

        // Debug
        //System.out.println("host=" + host + " port=" + port +
        //                 " objName=" + remaining.toString() + "\n");

        // Create a registry context.
        Context regCtx = new RegistryContext(host, port, env);

        return (new ResolveResult(regCtx, remaining));
    }
View Full Code Here

Examples of org.apache.harmony.jndi.provider.rmi.registry.RegistryContext

        if (start < length) {
            name.add(url.substring(start));
        }

        return new ResolveResult(
                new RegistryContext(hostName, port, environment), name);
    }
View Full Code Here

Examples of org.jboss.fresh.registry.RegistryContext

        }
        con.setAutoCommit(false);
      }
    } else {
      if (dts == null) {
        RegistryContext ctx = new RegistryContext();
        dts = (DataSource) ctx.lookup(ds);
      }

      con = dts.getConnection();
      log.info("Got connection from pool: " + con + " (autocommit:" + con.getAutoCommit() + ')');
      con.setAutoCommit(false);
View Full Code Here

Examples of org.wso2.carbon.registry.core.config.RegistryContext

        CommonUtil.contextRoot = contextRoot;
    }

    public static boolean generateHandler(Registry configSystemRegistry, String resourceFullPath) throws RegistryException,
            XMLStreamException {
        RegistryContext registryContext = configSystemRegistry.getRegistryContext();
        if (registryContext == null) {
            return false;
        }
        Resource resource = configSystemRegistry.get(resourceFullPath);
        if (resource != null) {
View Full Code Here

Examples of org.wso2.carbon.registry.core.config.RegistryContext

            q1.addProperty(RegistryConstants.RESULT_TYPE_PROPERTY_NAME,
                    RegistryConstants.RESOURCES_RESULT_TYPE);
            registry.put(searchServicesQuery, q1);
        }
*/
        RegistryContext registryContext = registry.getRegistryContext();
        String serviceStoredPath = registryContext.getServicePath() + "/";

        Map<String, String> parameters = new HashMap<String, String>();
//        if (RegistryUtils.isRegistryReadOnly(registry.getRegistryContext())) {
//            parameters.put("query", sql);
//        }
View Full Code Here

Examples of org.wso2.carbon.registry.core.config.RegistryContext

        return null;
    }

    public static boolean generateAspect(String resourceFullPath, Registry registry) throws RegistryException, XMLStreamException {
        RegistryContext registryContext = registry.getRegistryContext();
        if (registryContext == null) {
            return false;
        }
        Resource resource = registry.get(resourceFullPath);
        if (resource != null) {
View Full Code Here

Examples of org.wso2.carbon.registry.core.config.RegistryContext

        RegistryService registryService = Utils.getRegistryService();
        if (registryService == null) {
            log.error("Registry Service has not been set.");
        } else {
            try {
                RegistryContext context =
                        registryService.getRegistry().getRegistryContext();
                if (context != null) {
                    return context.isReadOnly();
                }
            } catch (Exception e) {
                log.error("An error occurred while obtaining registry instance", e);
            }
        }
View Full Code Here

Examples of org.wso2.carbon.registry.core.config.RegistryContext

            log.warn(msg);
            throw new AuthorizationFailedException(msg);
        }

        // then add the new resource/collection
        RegistryContext registryContext = null;
        if (CurrentSession.getUserRegistry() != null) {
            registryContext = CurrentSession.getUserRegistry().getRegistryContext();
        }
        if (registryContext == null) {
            registryContext = RegistryContext.getBaseInstance();
        }
        if (!Boolean.FALSE.equals(CurrentSession.getAttribute(IS_LOGGING_ACTIVITY))) {
            registryContext.getLogWriter().addLog(
                    path, CurrentSession.getUser(), LogEntry.ADD, null);
        }
        if (!(resource instanceof CollectionImpl)) {
            if (resource.getMediaType() == null || resource.getMediaType().length() == 0) {
                String temp = MediaTypesUtils.getMediaType(RegistryUtils.getResourceName(path));
View Full Code Here

Examples of org.wso2.carbon.registry.core.config.RegistryContext

        }

        // we ignore the resource.isContentModified()), isPropertiesModified
        //  as we have to store the version correctly

        RegistryContext registryContext = null;
        if (CurrentSession.getUserRegistry() != null) {
            registryContext = CurrentSession.getUserRegistry().getRegistryContext();
        }
        if (registryContext == null) {
            registryContext = RegistryContext.getBaseInstance();
        }
        if (!Boolean.FALSE.equals(CurrentSession.getAttribute(IS_LOGGING_ACTIVITY))) {
            registryContext.getLogWriter().addLog(resourceID.getPath(), CurrentSession.getUser(),
                    LogEntry.UPDATE, null);
        }
        if (!(resource instanceof CollectionImpl)) {
            if (resource.getMediaType() == null || resource.getMediaType().length() == 0) {
                String temp = MediaTypesUtils.getMediaType(
View Full Code Here

Examples of org.wso2.carbon.registry.core.config.RegistryContext

     * @param requestContext Details of the request.
     *
     * @return whether the resource exists
     */
    public RegistryContext getRegistryContext(RequestContext requestContext) {
        RegistryContext registryContext = null;
        Set<Filter> filters = getRegistryContextHandlerMap.keySet();
        for (Filter filter : filters) {
            if (filter != null && filter.handleGetRegistryContext(requestContext)) {
                Set<Handler> handlerSet = getRegistryContextHandlerMap.get(filter);
                Handler[] handlers = handlerSet.toArray(new Handler[handlerSet.size()]);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.