00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 package org.objectweb.jonas.resource;
00027
00028 import java.util.Properties;
00029 import java.io.File;
00030 import java.net.URL;
00031
00032 import org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject;
00033
00041 public class ResourceAdapter extends J2EEManagedObject {
00042
00043
00047 private String jcaResourceObjectName = null;
00048
00052 private Properties prop = null;
00056 private String jndiname = null;
00060 private String filename = null;
00064 private boolean inEarCase = false;
00068 private URL earURL = null;
00069
00079 public ResourceAdapter(String objectName, Properties prop, String jndiname, String filename,
00080 boolean inEarCase, URL earURL) {
00081 super(objectName);
00082 this.prop = prop;
00083 this.jndiname = jndiname;
00084
00085 try {
00086 this.filename = (new File(filename)).toURL().getPath();
00087 } catch (Exception e) {
00088 this.filename = filename;
00089 }
00090 this.inEarCase = inEarCase;
00091 this.earURL = earURL;
00092 }
00093
00098 public Properties getProperties() {
00099 return prop;
00100 }
00101
00106 public String getJndiName() {
00107 return jndiname;
00108 }
00109
00114 public String getFileName() {
00115 return filename;
00116 }
00117
00122 public boolean getInEarCase() {
00123 return inEarCase;
00124 }
00125
00130 public URL getEarURL() {
00131 return earURL;
00132 }
00133
00138 public String getJcaResource() {
00139 return jcaResourceObjectName;
00140 }
00141
00146 public void setJcaResource(String jcaResourceObjectName) {
00147 this.jcaResourceObjectName = jcaResourceObjectName;
00148 }
00149 }