Package nexj.core.rpc.file.ra

Examples of nexj.core.rpc.file.ra.FileManagedConnectionFactory


      if (s_logger.isInfoEnabled())
      {
         s_logger.info("Creating J2EE-uncontained connection factory for channel \"" + m_channel.getName() + "\"");
      }
     
      FileManagedConnectionFactory mcf = new FileManagedConnectionFactory();
     
      //Configure it according to the settings on the channel.
      mcf.setInputConnection(false);
      mcf.setOutgoingTempDirectory(m_channel.getTemporaryDirectory());
      mcf.setOutgoingDirectory(m_channel.getOutgoingDirectory());
     
      File journalPath = new File(m_channel.getOutgoingJournalPath());
     
      if (!journalPath.isAbsolute())
      {
         GenericConfig platformConfig = new GenericConfig();
        
         journalPath = new File(platformConfig.createDataDirectory(),
            m_channel.getOutgoingJournalPath());
      }

      mcf.setJournalDirectory(journalPath.getAbsolutePath());

      return (FileConnectionFactory)mcf.createConnectionFactory();
   }
View Full Code Here


      if (J2EEUtil.isContained())
      {
         throw new IllegalStateException("XAFileStorageConnectionFactory is only for J2EE non-contained mode");
      }

      FileManagedConnectionFactory mcf = new FileManagedConnectionFactory();

      mcf.setPersistenceConnection(true);
      mcf.setInputConnection(false);
      mcf.setOutgoingDirectory(m_fragment.getDataDirectory());
      mcf.setOutgoingTempDirectory(m_fragment.getTemporaryDirectory());
      mcf.setMaxNameSplits(m_fragment.getMaxNameSplits());
      mcf.setNameSplitSize(m_fragment.getNameSplitSize());

      File journalPath = new File(m_fragment.getJournalPath());

      if (!journalPath.isAbsolute())
      {
         try
         {
            journalPath = new File(new GenericConfig().createDataDirectory(),
               m_fragment.getJournalPath());
         }
         catch (IOException e)
         {
            return null;
         }
      }

      mcf.setJournalDirectory(journalPath.getAbsolutePath());

      try
      {
         m_factory = (FileConnectionFactory)mcf.createConnectionFactory();
         return m_factory;
      }
      catch (ResourceException ex)
      {
         return null;
View Full Code Here

TOP

Related Classes of nexj.core.rpc.file.ra.FileManagedConnectionFactory

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.