KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > platform > server > oc4j > Oc4jPlatform


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2006, Oracle. All rights reserved.
22
package oracle.toplink.essentials.platform.server.oc4j;
23
24 import oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl;
25 import oracle.toplink.essentials.logging.JavaLog;
26 import oracle.toplink.essentials.logging.SessionLog;
27 import oracle.toplink.essentials.transaction.oc4j.Oc4jTransactionController;
28 import oracle.toplink.essentials.platform.server.ServerPlatformBase;
29
30 /**
31  * PUBLIC:
32  *
33  * This is the concrete subclass responsible for representing Oc4j-specific server behaviour.
34  *
35  * This platform overrides:
36  *
37  * getExternalTransactionControllerClass(): to use an Oc4j-specific controller class
38  *
39  */

40 public class Oc4jPlatform extends ServerPlatformBase {
41
42     /**
43      * INTERNAL:
44      * Default Constructor: All behaviour for the default constructor is inherited
45      */

46     public Oc4jPlatform(DatabaseSessionImpl newDatabaseSession) {
47         super(newDatabaseSession);
48     }
49
50     /**
51      * INTERNAL: getExternalTransactionControllerClass(): Answer the class of external transaction controller to use
52      * for Oc4j. This is read-only.
53      *
54      * @return Class externalTransactionControllerClass
55      *
56      * @see oracle.toplink.essentials.transaction.JTATransactionController
57      * @see ServerPlatformBase.isJTAEnabled()
58      * @see ServerPlatformBase.disableJTA()
59      * @see ServerPlatformBase.initializeExternalTransactionController()
60      */

61     public Class JavaDoc getExternalTransactionControllerClass() {
62         if (externalTransactionControllerClass == null){
63             externalTransactionControllerClass = Oc4jTransactionController.class;
64         }
65         return externalTransactionControllerClass;
66     }
67
68     /**
69      * INTERNAL: getServerLog(): Return the ServerLog for this platform
70      *
71      * Return JavaLog for Oc4jPlatform
72      *
73      * @return oracle.toplink.essentials.logging.SessionLog
74      */

75     //Bug5389724
76
public SessionLog getServerLog() {
77         return new JavaLog();
78     }
79 }
Popular Tags