Package com.sun.sgs.impl.service.data

Examples of com.sun.sgs.impl.service.data.DataServiceImpl$ContextFactory


    {
        final ContextFactoryMapper contextFactoryMapper = ContextFactoryMapper.getFactory() ;
        try
        {
            final String coordinationType = createCoordinationContext.getCoordinationType() ;
            final ContextFactory contextFactory = contextFactoryMapper.getContextFactory(coordinationType) ;
           
            if (contextFactory != null)
            {
                final CoordinationContext coordinationContext ;
                try
                {
                    final Expires expiresElement = createCoordinationContext.getExpires() ;
                    final Long expires = (expiresElement == null ? null : new Long(expiresElement.getValue())) ;
                   
                    coordinationContext = contextFactory.create(coordinationType, expires, createCoordinationContext.getCurrentContext(), isSecure) ;
                    final CreateCoordinationContextResponseType response = new CreateCoordinationContextResponseType() ;
                    response.setCoordinationContext(coordinationContext) ;
                    return response;
                }
                catch (final InvalidCreateParametersException invalidCreateParametersException)
View Full Code Here


  public void removeContextFactory (String coordinationTypeURI)
  {
    try
    {
      ContextFactory contextFactory = (ContextFactory) _protocols.removeProtocol(convert(coordinationTypeURI));

      contextFactory.uninstall(coordinationTypeURI);
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
View Full Code Here

                if (type instanceof String)
                {
                    Class c = Class.forName((String) type);

                    ContextFactory factory = (ContextFactory) c.newInstance();

                    _protocols.replaceProtocol(doc, factory);

                    return factory;
                }
View Full Code Here

    {
        final ContextFactoryMapper contextFactoryMapper = ContextFactoryMapper.getFactory() ;
        try
        {
            final String coordinationType = createCoordinationContext.getCoordinationType() ;
            final ContextFactory contextFactory = contextFactoryMapper.getContextFactory(coordinationType) ;
           
            if (contextFactory != null)
            {
                final CoordinationContext coordinationContext ;
                try
                {
                    final Expires expiresElement = createCoordinationContext.getExpires() ;
                    final Long expires = (expiresElement == null ? null : new Long(expiresElement.getValue())) ;
                   
                    coordinationContext = contextFactory.create(coordinationType, expires, createCoordinationContext.getCurrentContext(), isSecure) ;
                    final CreateCoordinationContextResponseType response = new CreateCoordinationContextResponseType() ;
                    response.setCoordinationContext(coordinationContext) ;
                    return response;
                }
                catch (final InvalidCreateParametersException invalidCreateParametersException)
View Full Code Here

        if (!dataDir.mkdir()) {
            throw new RuntimeException("Failed to create sub-dir: " + dataDir);
        }
  props.remove(DataStoreImplClassName + ".directory");
  props.setProperty(StandardProperties.APP_ROOT, rootDir);
  DataServiceImpl testSvc =
      createDataServiceImpl(props, componentRegistry, txnProxy);
        testSvc.shutdown();
    }
View Full Code Here

      if (!dir.mkdir()) {
    throw new RuntimeException(
        "Problem creating directory: " + dir);
      }
  }
  return new DataServiceImpl(props, componentRegistry, txnProxy);
    }
View Full Code Here

     * @return  the new data service
     * @throws  Exception if a problem occurs when creating the service
     */
    private DataService createDataService(Properties props) throws Exception {
  DataService dataService =
      new DataServiceImpl(props, systemRegistry, txnProxy);
  ComponentRegistry services =
      new SingletonComponentRegistry(dataService);
  ComponentRegistry managers =
      new SingletonComponentRegistry(
    new ProfileDataManager(dataService));
View Full Code Here

        if (!dataDir.mkdir()) {
            throw new RuntimeException("Failed to create sub-dir: " + dataDir);
        }
  props.remove(DataStoreImplClassName + ".directory");
  props.setProperty(StandardProperties.APP_ROOT, rootDir);
  DataServiceImpl testSvc =
      createDataServiceImpl(props, componentRegistry, txnProxy);
        testSvc.shutdown();
    }
View Full Code Here

      if (!dir.mkdir()) {
    throw new RuntimeException(
        "Problem creating directory: " + dir);
      }
  }
  return new DataServiceImpl(props, componentRegistry, txnProxy);
    }
View Full Code Here

     * @return  the new data service
     * @throws  Exception if a problem occurs when creating the service
     */
    private DataService createDataService(Properties props) throws Exception {
  DataService dataService =
      new DataServiceImpl(props, systemRegistry, txnProxy);
  ComponentRegistry services =
      new SingletonComponentRegistry(dataService);
  ComponentRegistry managers =
      new SingletonComponentRegistry(
    new ProfileDataManager(dataService));
View Full Code Here

TOP

Related Classes of com.sun.sgs.impl.service.data.DataServiceImpl$ContextFactory

Copyright © 2018 www.massapicom. 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.