Methods Summary |
---|
java.net.URL | extractDescriptorUrl(java.lang.String resource)
String urlStr = deploymentInfo.url.getFile();
// However the jar must also contain at least one ejb-jar.xml
try
{
URL dd = deploymentInfo.localCl.findResource(resource);
if (dd == null)
{
return null;
}
// If the DD url is not a subset of the urlStr then this is coming
// from a jar referenced by the deployment jar manifest and the
// this deployment jar it should not be treated as an ejb-jar
if (deploymentInfo.localUrl != null)
{
urlStr = deploymentInfo.localUrl.toString();
}
String ddStr = dd.toString();
if (ddStr.indexOf(urlStr) >= 0)
{
return dd;
}
}
catch (Exception ignore)
{
}
return null;
|
public java.lang.ClassLoader | getClassLoader()
return deploymentInfo.ucl;
|
public java.util.List | getClasses()
return null;
|
public java.lang.String | getDefaultEntityManagerName()
String url = getUrl().toString();
String name = url.substring(url.lastIndexOf('/") + 1, url.lastIndexOf('."));
return name;
|
public java.util.Map | getDefaultPersistenceProperties()
try
{
EJB3DeployerMBean deployer = (EJB3DeployerMBean) MBeanProxyExt.create(EJB3DeployerMBean.class, EJB3DeployerMBean.OBJECT_NAME,
deploymentInfo.getServer());
return deployer.getDefaultProperties();
}
catch (Exception e)
{
throw new RuntimeException(e);
}
|
public java.net.URL | getEjbJarXml()
return extractDescriptorUrl("META-INF/ejb-jar.xml");
|
public org.jboss.ejb3.interceptor.InterceptorInfoRepository | getInterceptorInfoRepository()
return interceptorInfoRepository;
|
public java.net.URL | getJbossXml()
return extractDescriptorUrl("META-INF/jboss.xml");
|
public java.util.Hashtable | getJndiProperties()
return null;
|
public java.net.URL | getPersistenceXml()
return extractDescriptorUrl("META-INF/persistence.xml");
|
public java.net.URL | getRelativeURL(java.lang.String jar)
URL url = null;
try
{
url = new URL(jar);
}
catch (MalformedURLException e)
{
try
{
if (jar.startsWith(".."))
{
if (getUrl() == null)
throw new RuntimeException("relative <jar-file> not allowed when standalone deployment unit is used");
String base = getUrl().toString();
jar = jar.replaceAll("\\.\\./", "+");
int idx = jar.lastIndexOf('+");
jar = jar.substring(idx + 1);
for (int i = 0; i < idx + 1; i++)
{
int slash = base.lastIndexOf('/");
base = base.substring(0, slash + 1);
}
url = new URL(base + jar.substring(idx));
}
else
{
File fp = new File(jar);
url = fp.toURL();
}
}
catch (MalformedURLException e1)
{
throw new RuntimeException("Unable to find relative url: " + jar, e1);
}
}
return url;
|
public java.lang.ClassLoader | getResourceLoader()
return deploymentInfo.localCl;
|
public java.lang.String | getShortName()
return deploymentInfo.shortName;
|
public java.net.URL | getUrl()
return deploymentInfo.url;
|