Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2011 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.springframework.data.neo4j.config;
 
 
 import  org.springframework.beans.factory.FactoryBean;
 import  org.springframework.transaction.jta.JtaTransactionManager;
 import  org.springframework.transaction.jta.UserTransactionAdapter;
 
 public class JtaTransactionManagerFactoryBean implements FactoryBean<JtaTransactionManager>
 {
     private final JtaTransactionManager jtaTransactionManager;
 
     {
          = creategds );
     }
 
     @Override
     public JtaTransactionManager getObject() throws Exception
     {
         return ;
     }
 
     @Override
     public Class<JtaTransactionManager> getObjectType()
     {
         return JtaTransactionManager.class;
     }
 
     @Override
     public boolean isSingleton()
     {
         return true;
     }
 
     private JtaTransactionManager createGraphDatabaseService gds ) throws Exception
     {
         if ( !(gds instanceof GraphDatabaseAPI) )
         {
             return createNullJtaTransactionManager();
         }
 
         try
         {
             return createJtaTransactionManagergds );
         }
         catch ( NoSuchMethodException e )
         {
             return createJtaTransactionManagerForOnePointSevengds );
         }
     }
 
     private JtaTransactionManager createNullJtaTransactionManager()
     {
         TransactionManager transactionManager = new NullTransactionManager();
         UserTransaction userTransaction = new UserTransactionAdapter( transactionManager );
 
         return new JtaTransactionManager( userTransactiontransactionManager );
     }
 
     private JtaTransactionManager createJtaTransactionManagerForOnePointSevenGraphDatabaseService gds ) throws Exception
     {
         TransactionManager transactionManager = createTransactionManagerForOnePointSevengds );
         UserTransaction userTransaction = createUserTransactionForOnePointSevengds );
 
         return new JtaTransactionManager( userTransactiontransactionManager );
     }
 
     private JtaTransactionManager createJtaTransactionManagerGraphDatabaseService gds ) throws Exception
     {
         TransactionManager transactionManager = createTransactionManagerForOnePointEightgds );
         UserTransaction userTransaction = createUserTransactionForOnePointEightgds );
 
         return new JtaTransactionManager( userTransactiontransactionManager );
     }
 
     {
         return createDynamicallySpringTransactionManager.classGraphDatabaseService.classgds );
    }
    {
        return createDynamicallyUserTransactionImpl.classTransactionManager.classtxManager );
    }
    {
        return createDynamicallySpringTransactionManager.classGraphDatabaseAPI.classgds );
    }
    {
        return createDynamicallyUserTransactionImpl.classGraphDatabaseAPI.classgds );
    }
    private <T> T createDynamicallyClass<T> requiredClassClass<?> argumentClassObject gds ) throws Exception
    {
        return requiredClass.getDeclaredConstructorargumentClass ).newInstancegds );
    }
New to GrepCode? Check out our FAQ X