KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > deploy > JmsResource


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 /*
25  * JmsResource.java
26  *
27  * Created on January 12, 2002, 12:15 PM
28  */

29
30 package com.sun.enterprise.tools.common.deploy;
31
32 import java.beans.*;
33 import java.util.List JavaDoc;
34 import com.sun.enterprise.tools.common.util.diagnostics.Reporter;
35
36 public class JmsResource extends BaseResource {
37     
38     private NameValuePair[] extParams = new NameValuePair[0];
39     
40     public JmsResource(List JavaDoc resources) {
41         super(resources, "JmsResource"); // NOI18N
42
JndiName = "jms/jndiname";//NOI18N
43
setResType("javax.jms.Queue"); // NOI18N
44
}
45     
46     public NameValuePair[] getExtParams() {
47         return extParams;
48     }
49
50     public void setExtParams(Object JavaDoc[] value) {
51         Reporter.info(new Integer JavaDoc(value.length)); //NOI18N
52
NameValuePair[] pairs = new NameValuePair[value.length];
53         for (int i = 0; i < value.length; i++) {
54             NameValuePair val = (NameValuePair)value[i];
55             NameValuePair pair = new NameValuePair();
56             pair.setParamName(val.getParamName());
57             pair.setParamValue(val.getParamValue());
58             pair.setParamDescription(val.getParamDescription());
59             Reporter.info(pair.getParamName() + " " + pair.getParamValue()); //NOI18N
60
pairs[i] = pair;
61         }
62         NameValuePair[] oldValue = extParams;
63         this.extParams = pairs;
64         initPropertyChangeSupport();
65         propertySupport.firePropertyChange ("extParams", oldValue, extParams);//NOI18N
66
}
67 }
68
Popular Tags