Methods Summary |
---|
public void | accept(com.sun.enterprise.deployment.WebService webService)visits a web service definition
|
public void | accept(com.sun.enterprise.deployment.MethodPermission pm, java.util.Iterator methods)visits a method permission and permitted methods for the last J2EE component visited
|
public void | accept(com.sun.enterprise.deployment.RoleReference roleRef)visits a role reference for the last J2EE component visited
|
public void | accept(com.sun.enterprise.deployment.MethodDescriptor method, com.sun.enterprise.deployment.ContainerTransaction ct)visists a method transaction for the last J2EE component visited
|
public void | accept(com.sun.enterprise.deployment.EnvironmentProperty envEntry)visits an environment property for the last J2EE component visited
|
public void | accept(com.sun.enterprise.deployment.ResourceReferenceDescriptor resRef)visits an resource reference for the last J2EE component visited
|
public void | accept(com.sun.enterprise.deployment.JmsDestinationReferenceDescriptor jmsDestRef)visits an jms destination reference for the last J2EE component visited
|
public void | accept(com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor msgDestRef)visits an message destination reference for the last J2EE component visited
|
public void | accept(com.sun.enterprise.deployment.MessageDestinationDescriptor msgDest)visits an message destination for the last J2EE component visited
|
public void | accept(com.sun.enterprise.deployment.ApplicationClientDescriptor appclientdescriptor)visits a appclient descriptor
bundleDescriptor = appclientdescriptor;
|
public void | accept(com.sun.enterprise.deployment.Application application)visit an application object
|
public void | accept(com.sun.enterprise.deployment.FieldDescriptor fd)visits a CMP field definition (for CMP entity beans)
|
public void | accept(com.sun.enterprise.deployment.MethodDescriptor method, com.sun.enterprise.deployment.QueryDescriptor qd)visits a query method
|
public void | accept(com.sun.enterprise.deployment.RelationshipDescriptor descriptor)visits an ejb relationship descriptor
|
public void | accept(com.sun.enterprise.deployment.Descriptor descriptor)visits a J2EE descriptor
|
public void | accept(com.sun.enterprise.deployment.WebBundleDescriptor descriptor)visit a web bundle descriptor
this.bundleDescriptor = descriptor;
|
public void | accept(com.sun.enterprise.deployment.EjbBundleDescriptor bundleDescriptor)visits an ejb bundle descriptor
this.bundleDescriptor = bundleDescriptor;
|
public void | accept(com.sun.enterprise.deployment.WebComponentDescriptor descriptor)visit a web component descriptor
|
public void | accept(com.sun.enterprise.deployment.EjbDescriptor ejb)visits an ejb descriptor
|
public void | accept(com.sun.enterprise.deployment.ConnectorDescriptor conDesc)visits a connector descriptor
|
public void | accept(com.sun.enterprise.deployment.InjectionCapable injectable)
|
public void | accept(com.sun.enterprise.deployment.types.EjbReference ejbRef)visits an ejb reference for the last J2EE component visited
|
public void | accept(com.sun.enterprise.deployment.types.MessageDestinationReferencer msgDestReferencer)
|
public void | accept(com.sun.enterprise.deployment.ServiceReferenceDescriptor serviceRef)visits a web service reference descriptor
|
protected void | acceptWithCL(com.sun.enterprise.deployment.InjectionCapable injectable)
// If parsed from deployment descriptor, we need to determine whether
// the inject target name refers to an injection field or an
// injection method for each injection target
for (InjectionTarget target : injectable.getInjectionTargets()) {
if( (target.getFieldName() == null) &&
(target.getMethodName() == null) ) {
String injectTargetName = target.getTargetName();
String targetClassName = target.getClassName();
ClassLoader classLoader = getBundleDescriptor().getClassLoader();
Class targetClazz = null;
try {
targetClazz = classLoader.loadClass(targetClassName);
} catch(ClassNotFoundException cnfe) {
// @@@
// Don't treat this as a fatal error for now. One known issue
// is that all .xml, even web.xml, is processed within the
// appclient container during startup. In that case, there
// are issues with finding .classes in .wars due to the
// structure of the returned client .jar and the way the
// classloader is formed.
DOLUtils.getDefaultLogger().fine
("Injection class " + targetClassName + " not found for " +
injectable);
return;
}
// Spec requires that we attempt to match on method before field.
boolean matched = false;
// The only information we have is method name, so iterate
// through the methods find a match. There is no overloading
// allowed for injection methods, so any match is considered
// the only possible match.
String setterMethodName = TypeUtil.
propertyNameToSetterMethod(injectTargetName);
// method can have any access type so use getDeclaredMethods()
for(Method next : targetClazz.getDeclaredMethods()) {
// only when the method name matches and the method
// has exactly one parameter, we find a match
if( next.getName().equals(setterMethodName) &&
next.getParameterTypes().length == 1) {
target.setMethodName(next.getName());
if( injectable.getInjectResourceType() == null ) {
Class[] paramTypes = next.getParameterTypes();
if (paramTypes.length == 1) {
String resourceType = paramTypes[0].getName();
injectable.setInjectResourceType(resourceType);
}
}
matched = true;
break;
}
}
if( !matched ) {
// In the case of injection fields, inject target name ==
// field name. Field can have any access type.
try {
Field f = targetClazz.getDeclaredField(injectTargetName);
target.setFieldName(injectTargetName);
if( injectable.getInjectResourceType() == null ) {
String resourceType = f.getType().getName();
injectable.setInjectResourceType(resourceType);
}
matched = true;
} catch(NoSuchFieldException nsfe) {
String msg = "No matching injection setter method or " +
"injection field found for injection property " +
injectTargetName + " on class " + targetClassName +
" for component dependency " + injectable;
throw new RuntimeException(msg, nsfe);
}
}
}
}
|
protected void | acceptWithoutCL(com.sun.enterprise.deployment.InjectionCapable injectable)
|
public AppClientVisitor | getAppClientVisitor()
return this;
|
protected com.sun.enterprise.deployment.BundleDescriptor | getBundleDescriptor()
return bundleDescriptor;
|
public ConnectorVisitor | getConnectorVisitor()
return this;
|
public EjbBundleVisitor | getEjbBundleVisitor()
return this;
|
public EjbVisitor | getEjbVisitor()
return this;
|
public WebBundleVisitor | getWebBundleVisitor()
return this;
|