KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejtools > jmx > browser > model > connector > TMX4J21ConnectionService


1 /*
2
3  * EJTools, the Enterprise Java Tools
4
5  *
6
7  * Distributable under LGPL license.
8
9  * See terms of license at www.gnu.org.
10
11  */

12
13 package org.ejtools.jmx.browser.model.connector;
14
15
16
17 import java.util.Hashtable JavaDoc;
18
19
20
21 import javax.naming.Context JavaDoc;
22
23
24
25 import org.ejtools.jmx.browser.model.service.ConnectionMetaData;
26
27
28
29
30
31 /**
32
33  * @author letiembl
34
35  * @created 4 septembre 2002
36
37  * @version $Revision: 1.6 $
38
39  */

40
41 public class TMX4J21ConnectionService extends AbstractConnectionService
42
43 {
44
45    /**
46
47     * @exception Exception Description of the Exception
48
49     */

50
51    protected void createMBeanServer()
52
53       throws Exception JavaDoc
54
55    {
56
57       System.setProperty("jmx.serial.form", "1.0");
58
59
60
61       Hashtable JavaDoc props = new Hashtable JavaDoc();
62
63       props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY));
64
65       props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES));
66
67       props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL));
68
69       props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL));
70
71       props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS));
72
73
74
75 // Stand by
76

77 //
78

79 // InitialContext context = new InitialContext(props);
80

81 // MBeanServerConnection connector = (MBeanServerConnection) context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT));
82

83 //
84

85 // MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(connector);
86

87 // this.setMBeanServer(mbeanServer);
88

89    }
90
91 }
92
93
Popular Tags