KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > server > ondemand > EjbServiceGroup


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 in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
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 Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.server.ondemand;
25
26
27 import java.io.*;
28 import java.util.Properties JavaDoc;
29 import java.util.Vector JavaDoc;
30 import java.net.*;
31 import java.rmi.RemoteException JavaDoc;
32 import javax.rmi.CORBA.Tie JavaDoc;
33 import javax.rmi.PortableRemoteObject JavaDoc;
34 import javax.management.ObjectName JavaDoc;
35 import org.omg.CORBA.ORB JavaDoc;
36 import com.sun.corba.ee.impl.orbutil.ORBConstants;
37
38 import com.sun.enterprise.*;
39 import com.sun.enterprise.util.*;
40 import com.sun.enterprise.log.*;
41 import com.sun.enterprise.naming.*;
42 import com.sun.enterprise.distributedtx.*;
43 import com.sun.enterprise.iiop.POAProtocolMgr;
44 import com.sun.enterprise.iiop.PEORBConfigurator;
45 import com.sun.enterprise.iiop.ORBMonitoring;
46 import com.sun.enterprise.naming.java.javaURLContext;
47 import java.util.logging.*;
48 import com.sun.logging.*;
49
50 import com.sun.appserv.server.LifecycleEvent;
51 import com.sun.appserv.server.ServerLifecycleException;
52
53 import com.sun.enterprise.server.ResourcesUtil;
54 import com.sun.enterprise.server.ServerContext;
55 import com.sun.enterprise.server.ServerContextImpl;
56 import com.sun.enterprise.server.ApplicationServer;
57 import com.sun.enterprise.config.*;
58 import com.sun.enterprise.config.serverbeans.*;
59 import com.sun.enterprise.transaction.monitor.JTSMonitorMBean;
60
61
62 import com.sun.enterprise.deployment.interfaces.SecurityRoleMapperFactoryMgr;
63 import com.sun.enterprise.deployment.interfaces.SecurityRoleMapperFactory;
64
65 import com.sun.enterprise.deployment.backend.OptionalPkgDependency;
66 import com.sun.enterprise.deployment.*;
67
68 import com.sun.enterprise.server.ondemand.entry.EntryContext;
69 import com.sun.enterprise.server.ondemand.entry.EntryPoint;
70 import com.sun.enterprise.connectors.ConnectorRuntime;
71
72 /**
73  * Represents the group services needed by EJBs. The main components
74  * of this servicegroup are ORB, JTS and system apps that use EJBs.
75  *
76  * @author Binod PG
77  * @see ServiceGroup
78  * @see ServiceGroupBuilder
79  */

80 public class EjbServiceGroup extends ServiceGroup {
81
82     public static final String JavaDoc J2EE_APPNAME =
83         "com.sun.enterprise.appname";
84     public static final String JavaDoc JTS_SERVER_ID =
85         "com.sun.jts.persistentServerId";
86     public static final String JavaDoc J2EE_SERVER_ID_PROP =
87     "com.sun.enterprise.J2EEServerId";
88
89     // private static final boolean debug = true;
90
private static final boolean debug =
91     com.sun.enterprise.util.logging.Debug.enabled;
92
93     private static LocalStringManagerImpl localStrings =
94     new LocalStringManagerImpl(com.sun.enterprise.server.J2EEServer.class);
95
96     private static final int DEFAULT_SERVER_ID = 100 ;
97
98     private final String JavaDoc MEJB_JNDI_NAME="ejb/mgmt/MEJB";
99
100
101     // Used for POAProtocolMgr to create poaids.db
102
// Used for activation repository servers.db
103
private File repositoryDir;
104
105     //IASRI 4661409 private Properties defaultProperties;
106
private int orbInitialPort;
107     private ORB JavaDoc orb;
108     private ProtocolManager protocolMgr;
109
110     /**
111      * Triggers the start of the servicegroup. The entry context
112      * that caused this startup is used by the servicegroup to obtain
113      * any startup information it require.
114      *
115      * @param context EntryContext object.
116      * @see EntryContext.
117      */

118     public void start(EntryContext context)
119     throws ServiceGroupException {
120         _start(context);
121         if (context.getEntryPointType() != EntryPoint.STARTUP) {
122             loadSystemApps();
123         }
124     }
125
126     // Internal start.
127
private void _start(EntryContext context)
128     throws ServiceGroupException {
129         ServerContext serverContext = context.getServerContext();
130         String JavaDoc[] args = serverContext.getCmdLineArgs();
131         if (args == null) args = new String JavaDoc[0];
132         try {
133             startORB(args);
134             //Lazy initialize jts tx manager.
135
J2EETransactionManagerImpl.createJTSTransactionManager();
136         } catch (Exception JavaDoc e) {
137             throw new ServiceGroupException (e);
138         }
139     }
140
141     /**
142      * Stop the servicegroup. It stops all the lifecycle modules belongs to this
143      * servicegroup.
144      */

145     public void stop(EntryContext context) throws ServiceGroupException {
146         super.stopLifecycleServices();
147     }
148
149     /**
150      * Abort the servicegroup. This is not called from anywhere as of now.
151      */

152     public void abort(EntryContext context) {
153         super.stopLifecycleServices();
154     }
155
156     /**
157      * Loads all the system apps belongs to this servicegroup.
158      * @see OnDemandServices
159      * @see SystemAppLoader
160      */

161     private void loadSystemApps() {
162         SystemAppLoader loader = OnDemandServer.getSystemAppLoader();
163         loader.loadSystemApps(loader.getEjbServiceGroupSystemApps());
164     }
165
166     /**
167      * Analyse the entrycontext and specifies whether this servicegroup
168      * can be started or not.
169      *
170      * @return boolean If true is returned, this servicegroup can be started
171      * If false is returned, the entrycontext is not recognized by the
172      * servicegroup.
173      */

174     public boolean analyseEntryContext( EntryContext context ) {
175
176         if (_logger.isLoggable(Level.FINER)) {
177             _logger.log(Level.FINER,
178             "Analysing the context in EJB ServiceGroup :" + context);
179         }
180
181         boolean result = false;
182         try {
183             ConfigContext ctxt = context.getServerContext().getConfigContext();
184             Config conf = ServerBeansFactory.getConfigBean( ctxt );
185
186             // If ondemand loading is switched off, indicate to load this
187
// service group.
188
if (context.getEntryPointType() == EntryPoint.STARTUP) {
189                 boolean onDemandStartup = ((Boolean JavaDoc) context.get()).booleanValue();
190                 if (onDemandStartup == false) {
191                     result = true;
192                 }
193             } else if (context.get() == null) {
194                 return false;
195             }
196
197             // If the app to be loaded contains atleast one EJB, return 0.
198
// If a user resource adapter being deployed is 1.5 RA, then
199
// For inbound transaction support, we need to start JTS and
200
// inturn ORB.
201
if (context.getEntryPointType() == EntryPoint.APPLOADER ) {
202                 Descriptor desc = (Descriptor) context.get();
203                 if (desc instanceof Application) {
204                     Application app = (Application) desc;
205                     if (app.getEjbComponentCount() > 0) {
206                         result = true;
207                     } else {
208                         for (ConnectorDescriptor cd :
209                             (java.util.Set JavaDoc<ConnectorDescriptor>) app.getRarDescriptors()) {
210                             if (!ResourcesUtil.getInstance().belongToSystemRar(cd.getName())) {
211                                 String JavaDoc raClass = cd.getResourceAdapterClass();
212                                 if (raClass != null && !raClass.trim().equals("")) {
213                                     result = true;
214                                     break;
215                                 }
216                             }
217                         }
218                     }
219                 } else if (desc instanceof ConnectorDescriptor ) {
220                     ConnectorDescriptor cd = (ConnectorDescriptor) desc;
221                     if (!ResourcesUtil.getInstance().belongToSystemRar(cd.getName())) {
222                         String JavaDoc raClass = cd.getResourceAdapterClass();
223                         if (raClass != null && !raClass.trim().equals("")) {
224                             result = true;
225                         }
226                     }
227                 } else {
228                     result = desc instanceof EjbBundleDescriptor ||
229                              desc instanceof EjbAbstractDescriptor;
230                 }
231             }
232
233             // If someone is looking up a system app that belongs to
234
// EJB servicegroup or
235
// If the resource being looked up is XA capable
236
// then return true.
237
if ( context.getEntryPointType() == EntryPoint.JNDI ) {
238                 String JavaDoc jndiName = (String JavaDoc) context.get();
239                 String JavaDoc JAVA = "java";
240                 String JavaDoc COMP = "comp";
241                 String JavaDoc ENV = "env";
242                 int minSize = (JAVA + ":" + COMP + "/" + ENV).length();
243
244                 // There are some corner cases, where app lookup transaction
245
// manager directly and use it.
246
String JavaDoc txMgr = javaURLContext.APPSERVER_TRANSACTION_MGR;
247
248                 if (jndiName.equals(txMgr)) {
249                      return true;
250                 }
251
252                 if (_logger.isLoggable(Level.FINER)) {
253                     _logger.log(Level.FINER, "Jndi name being analysed is :" + jndiName);
254                 }
255      
256                 if (jndiName.length() > minSize && jndiName.startsWith(JAVA)) {
257                     jndiName = jndiName.substring(JAVA.length() + 1);
258                     if (jndiName.startsWith(COMP)) {
259                         jndiName = jndiName.substring(COMP.length() + 1);
260                         if (jndiName.startsWith(ENV)) {
261                            jndiName = jndiName.substring(ENV.length() + 1);
262                         }
263                     }
264                 }
265
266                 if (jndiName.equalsIgnoreCase(MEJB_JNDI_NAME)) {
267                     result = true;
268                 } else {
269                     result = isXAResource(jndiName, ctxt);
270                 }
271             }
272
273             // If Mbean is accessing any of the system app belongs to this
274
// servicegroup return true;
275
if (context.getEntryPointType() == EntryPoint.MBEAN) {
276                 result = analyseObjectName((ObjectName JavaDoc) context.get());
277             }
278
279             // If any of the IIOP port is accessed, return true.
280
if ( context.getEntryPointType() == EntryPoint.PORT ) {
281                 // Start IIOP listener ports
282
IiopService iiopService = conf.getIiopService();
283                 IiopListener[] iiopListeners = iiopService.getIiopListener();
284                 for ( int i=0; i<iiopListeners.length; i++ ) {
285                     int port = Integer.parseInt(iiopListeners[i].getPort());
286                     if (port == ((Integer JavaDoc) context.get()).intValue() ) {
287                         result = true;
288                     }
289                 }
290             }
291         } catch (Exception JavaDoc e) {
292             e.printStackTrace();
293             result = false;
294         }
295         return result;
296     }
297
298     // Check if the resource is XA capable.
299
private boolean isXAResource(String JavaDoc jndiName, ConfigContext conf) {
300
301         try {
302             ConfigBean res = ResourceHelper.findResource(conf, jndiName);
303             if (res != null) {
304                 if(_logger.isLoggable(Level.FINE))
305             _logger.log(Level.FINE,"Got the resource :" + res);
306                 if (res instanceof JdbcResource) {
307                     String JavaDoc poolName = ((JdbcResource) res).getPoolName();
308                     JdbcConnectionPool pool =
309                     (JdbcConnectionPool) ResourceHelper.findResource(conf, poolName);
310                     if(_logger.isLoggable(Level.FINE))
311                 _logger.log(Level.FINE,"Got the Pool :" + pool);
312                     if (pool.getResType() != null &&
313                         pool.getResType().equals("javax.sql.XADataSource")) {
314                         return true;
315                     } else {
316                         return false;
317                     }
318                 }
319
320                 if (res instanceof ConnectorResource) {
321                     String JavaDoc poolName = ((ConnectorResource) res).getPoolName();
322                     Resources root = ((Domain)conf.getRootConfigBean()).getResources();
323                     ConnectorConnectionPool pool = (ConnectorConnectionPool)
324                     root. getConnectorConnectionPoolByName(poolName);
325                     if(_logger.isLoggable(Level.FINE))
326                 _logger.log(Level.FINE,"Got the Pool :" + pool);
327                     String JavaDoc txSupport = pool.getTransactionSupport();
328                     // We pessimistically decide that RA supports XA,
329
// when pool is not configured with transaction-support.
330
if (txSupport == null ||
331                         txSupport.trim().equals("") ||
332                         txSupport.trim().equals
333                         (ConnectorRuntime.XA_TRANSACTION_TX_SUPPORT_STRING) ) {
334                         return true;
335                     } else {
336                         return false;
337                     }
338                 }
339             }
340         } catch (Exception JavaDoc e) {
341             e.printStackTrace();
342             return false;
343         }
344
345         return false;
346
347     }
348
349     // Does the objectname belongs to any of the system apps
350
// in this servicegroup.
351
private boolean analyseObjectName(ObjectName JavaDoc name) {
352
353         /*
354         if (name == null) {
355             return true;
356         }
357        
358         String cat = name.getKeyProperty("category");
359         if (cat != null && cat.equals("monitor")) {
360             return true;
361         }
362         */

363
364         String JavaDoc nameStr = name.getKeyProperty("name");
365         String JavaDoc ref = name.getKeyProperty("ref");
366         String JavaDoc app = name.getKeyProperty("J2EEApplication");
367
368         return belongsToThisServiceGroup(nameStr) ||
369                belongsToThisServiceGroup(ref) ||
370                belongsToThisServiceGroup(app);
371
372     }
373
374     private boolean belongsToThisServiceGroup(String JavaDoc name) {
375         SystemAppLoader appLoader = OnDemandServer.getSystemAppLoader();
376         if (appLoader != null) {
377             for (Object JavaDoc n : appLoader.getEjbServiceGroupSystemApps()) {
378                 if (((String JavaDoc) n).equals(name)) {
379                     return true;
380                 }
381             }
382         }
383         return false;
384     }
385  
386     // Start ORB.
387
private void startORB(String JavaDoc[] args)
388     {
389         try {
390         Properties JavaDoc jtsProperties ;
391
392         // create the ORB
393
try {
394         // Initialize System properties
395
Properties JavaDoc props = System.getProperties();
396
397         // set server-id and server-port so that persistent EJBs
398
// in J2EEServer will be reachable after crashes.
399
props.setProperty(J2EE_APPNAME, "j2ee");
400
401         // Set lateRegistration to true, so JTS doesnt get initialized.
402
// JTS gets initialized later in protocolMgr.initTransactionService
403
// Need recoverable for JMS.
404
jtsProperties = initJTSProperties(true);
405
406         orb = createORB();
407
408             // Done to indicate this is a server and
409
// needs to create listen ports.
410
try {
411                     org.omg.CORBA.Object JavaDoc obj =
412                     orb.resolve_initial_references("RootPOA");
413             } catch(org.omg.CORBA.ORBPackage.InvalidName JavaDoc in) {
414             _logger.log(Level.SEVERE,"enterprise.orb_reference_exception",in);
415             }
416         } catch ( Exception JavaDoc ex ) {
417                 if(_logger.isLoggable(Level.SEVERE))
418             _logger.log(Level.SEVERE,"enterprise.createorb_exception",ex.toString());
419         if ( debug )
420             _logger.log(Level.FINEST,"Exception while creating ORB: ",ex);
421                 throw new RuntimeException JavaDoc("Unable to create ORB");
422         }
423
424         // Create the orbMonitoring to register the orb related statistic
425
// check only on the Server Side
426
if (Switch.getSwitch().getContainerType() == Switch.EJBWEB_CONTAINER) {
427         new ORBMonitoring( orb );
428         }
429
430             Switch theSwitch = Switch.getSwitch();
431
432         // create Protocol Mgr
433
protocolMgr = new com.sun.enterprise.iiop.POAProtocolMgr(orb);
434         theSwitch.setProtocolManager(protocolMgr);
435
436         protocolMgr.initializeNaming(repositoryDir, orbInitialPort);
437         ((POAProtocolMgr)protocolMgr).initializePOAs();
438
439         if(_logger.isLoggable(Level.FINE))
440                 _logger.log(Level.FINE,localStrings.getLocalString("j2ee.naming",
441             "Naming service started: ") + orbInitialPort);
442         // END OF IASRI 4660742
443

444             try {
445                 Switch.getSwitch().getProviderManager().initRemoteProvider();
446             } catch (RemoteException JavaDoc re) {
447                 _logger.log(Level.WARNING, "init.remote.provider", re);
448             }
449
450         // Initialize Transaction Service
451
PEORBConfigurator.initTransactionService(
452         "com.sun.jts.CosTransactions.DefaultTransactionService", jtsProperties );
453
454         } catch (Exception JavaDoc ex) {
455         if(_logger.isLoggable(Level.SEVERE))
456                 _logger.log(Level.SEVERE,"enterprise.j2eeservice_running_exception",ex.toString());
457         if ( debug )
458                 _logger.log(Level.FINEST,"Exception running j2ee services",ex);
459         Log.err.flush();
460         throw new RuntimeException JavaDoc(ex.getMessage(), ex);
461         }
462     }
463
464     /**
465      * Initialize the ORB.
466      */

467     private ORB JavaDoc createORB()
468     throws Exception JavaDoc
469     {
470         ORB JavaDoc orb = ORBManager.getORB() ;
471
472     // J2EEServer's persistent server port is same as ORBInitialPort.
473
orbInitialPort = ORBManager.getORBInitialPort();
474
475         if(_logger.isLoggable(Level.FINE))
476         _logger.log(Level.FINE,localStrings.getLocalString(
477         "j2ee.listenPort","J2EE server listen port: " ) + orbInitialPort);
478
479     return orb ;
480     }
481
482     /**
483      * Extends props with the JTS-related properties
484      * based on the specified parameters.
485      * The properties will be used as part of ORB initialization call.
486      */

487     public static Properties JavaDoc initJTSProperties(boolean lateRegistration)
488     {
489     Properties JavaDoc props = new Properties JavaDoc() ;
490
491         if (!lateRegistration) {
492             props.put("com.sun.corba.ee.CosTransactions.ORBJTSClass",
493               "com.sun.jts.CosTransactions.DefaultTransactionService");
494         }
495
496     com.sun.jts.CosTransactions.Configuration.setAsAppClientConatiner(false);
497     //read server.xml and convert them to props
498
//there's a member in the class - but standard way is below one
499
//START OF IASRI 4661409
500
ConfigContext ctx =
501         ApplicationServer.getServerContext().getConfigContext();
502         TransactionService txnService = null;
503         try{
504             txnService =
505         ServerBeansFactory.getTransactionServiceBean(ctx);
506         // ServerBeansFactory.getServerBean(ctx).getTransactionService();
507
// SRIK
508
props.put(com.sun.jts.CosTransactions.Configuration.HEURISTIC_DIRECTION,
509         txnService.getHeuristicDecision());
510         props.put(com.sun.jts.CosTransactions.Configuration.KEYPOINT_COUNT,
511         txnService.getKeypointInterval());
512
513             if (txnService.isAutomaticRecovery()) {
514         if(debug) {
515             _logger.log(Level.FINE,"Recoverable J2EE Server");
516         }
517                 props.put(com.sun.jts.CosTransactions.Configuration.MANUAL_RECOVERY,
518               "true");
519         }
520
521         boolean disable_distributed_transaction_logging = false;
522         String JavaDoc dbLoggingResource = null ;
523         ElementProperty[] eprops = txnService.getElementProperty();
524         for (int index = 0; index < eprops.length; index++) {
525         if ("disable-distributed-transaction-logging".equals(eprops[index].getName())) {
526             if (!("true".equals(eprops[index].getValue())))
527             disable_distributed_transaction_logging = false;
528             else
529             disable_distributed_transaction_logging = true;
530         } else if("xaresource-txn-timeout".equals(eprops[index].getName())){
531             String JavaDoc value = eprops[index].getValue();
532             _logger.log(Level.FINE,"XAResource transaction timeout is"+value);
533             if (value != null) {
534             com.sun.jts.jta.TransactionManagerImpl.setXAResourceTimeOut(
535                 Integer.parseInt(value));
536             }
537         } else if ("db-logging-resource".equals(eprops[index].getName())) {
538                     dbLoggingResource = eprops[index].getValue();
539                     _logger.log(Level.FINE,"Transaction DB Logging Resource Name" + dbLoggingResource);
540                     if (dbLoggingResource == null || " ".equals(dbLoggingResource)) {
541                         dbLoggingResource = "jdbc/TxnDS";
542                     }
543                 }
544         }
545             if (dbLoggingResource != null) {
546                 disable_distributed_transaction_logging = true;
547                 props.put(com.sun.jts.CosTransactions.Configuration.DB_LOG_RESOURCE,
548                           dbLoggingResource);
549             }
550
551             /**
552            JTS_SERVER_ID needs to be unique for each for server instance.
553            This will be used as recovery identifier along with the hostname
554            for example: if the hostname is 'tulsa' and iiop-listener-port is 3700
555            recovery identifier will be tulsa,P3700
556             **/

557             String JavaDoc jtsServerId =
558         String.valueOf(DEFAULT_SERVER_ID); // default value
559
IiopService iiopServiceBean =
560         ServerBeansFactory.getIiopServiceBean(ctx);
561             if (iiopServiceBean != null) {
562                 IiopListener iiopListener = iiopServiceBean.getIiopListener(0);
563                 if (iiopListener != null) {
564                     jtsServerId = iiopListener.getPort();
565                 }
566             }
567             props.put(JTS_SERVER_ID,jtsServerId);
568
569             /* ServerId is an J2SE persistent server activation
570            API. ServerId is scoped at the ORBD. Since
571            There is no ORBD present in J2EE the value of
572            ServerId is meaningless - except it must have
573            SOME value if persistent POAs are created. */

574
575         // For clusters - all servers in the cluster MUST
576
// have the same ServerId so when failover happens
577
// and requests are delivered to a new server, the
578
// ServerId in the request will match the new server.
579

580         String JavaDoc serverId = String.valueOf(DEFAULT_SERVER_ID);
581         System.setProperty(J2EE_SERVER_ID_PROP, serverId);
582
583         if (_logger.isLoggable(Level.FINE)) {
584         _logger.log(Level.FINE,
585                 "++++ Server id: "
586                 + props.getProperty(ORBConstants.SERVER_ID_PROPERTY));
587         }
588
589         /**
590          * if the auto recovery is true, always transaction logs will be written irrespective of
591          * disable_distributed_transaction_logging.
592          * if the auto recovery is false, then disable_distributed_transaction_logging will be used
593          * to write transaction logs are not.If disable_distributed_transaction_logging is set to
594          * false(by default false) logs will be written, set to true logs won't be written.
595          **/

596             if (!txnService.isAutomaticRecovery() && disable_distributed_transaction_logging) {
597                 com.sun.jts.CosTransactions.Configuration.disableFileLogging();
598             }
599             if (dbLoggingResource == null) {
600         String JavaDoc logdir=txnService.getTxLogDir();
601                 if(logdir==null){
602             Domain svr = null;
603             svr = ServerBeansFactory.getDomainBean(ctx);
604             logdir = svr.getLogRoot();
605             if(logdir == null){
606                         logdir = FileUtil.getAbsolutePath(".."+File.separator+"logs");
607             }
608         } else if( ! (new File(logdir)).isAbsolute()) {
609                     if(_logger.isLoggable(Level.FINE))
610                 _logger.log(Level.FINE,"enterprise.relative_tx_log_dir" , logdir);
611             Domain svr = null;
612             svr = ServerBeansFactory.getDomainBean(ctx);
613             String JavaDoc logroot=svr.getLogRoot();
614             if(logroot != null){
615             logdir = logroot + File.separator + logdir;
616             } else {
617             logdir = FileUtil.getAbsolutePath(".."+File.separator+"logs"
618                 +File.separator+logdir);
619             }
620         }
621         String JavaDoc instanceName = ApplicationServer.getServerContext().getInstanceName();
622                 logdir += File.separator + instanceName + File.separator+"tx";
623
624                 if (debug) {
625             _logger.log(Level.FINE,"JTS log directory: " + logdir);
626             _logger.log(Level.FINE,"JTS Server id " + jtsServerId);
627                 }
628                 (new File(logdir)).mkdirs();
629                 props.put(com.sun.jts.CosTransactions.Configuration.LOG_DIRECTORY,
630               logdir);
631         }
632             props.put(com.sun.jts.CosTransactions.Configuration.COMMIT_RETRY,
633                       txnService.getRetryTimeoutInSeconds());
634
635         } catch(ConfigException e){
636             throw new RuntimeException JavaDoc("Error reading configuration : "+e);
637         }
638     com.sun.jts.CosTransactions.Configuration.setProperties(props);
639     return props ;
640     }
641 }
642
643 // End of file.
644
Popular Tags