Package: JotmFactory

JotmFactory

nameinstructionbranchcomplexitylinemethod
JotmFactory()
M: 22 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getTransactionManager()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2012 SAP AG
3: * All rights reserved. This program and the accompanying materials
4: * are made available under the terms of the Eclipse Public License v1.0
5: * which accompanies this distribution, and is available at
6: * http://www.eclipse.org/legal/epl-v10.html
7: *
8: * Contributors:
9: * SAP AG - initial contribution
10: *******************************************************************************/
11:
12: package org.eclipse.virgo.web.enterprise.openejb.jotmintegration;
13:
14: import java.rmi.RemoteException;
15:
16: import javax.transaction.TransactionManager;
17:
18: import org.objectweb.jotm.Current;
19: import org.objectweb.jotm.TransactionFactoryImpl;
20:
21: public class JotmFactory {
22:
23:         Current jotmCurrent;
24:         public JotmFactory() {
25:                 try {
26:                 jotmCurrent = new Current(new TransactionFactoryImpl());
27:                 } catch (RemoteException e) {
28:                         System.out.println("Unexpected remote exception" + e);
29:                 }
30:         }
31:         
32:         public TransactionManager getTransactionManager() {
33:                 return jotmCurrent.getTransactionManager();
34:         }
35: }