[Beginner's Corner] - How to deploy an uncompressed service?
by João Batista
João Batista [http://community.jboss.org/people/jbatista] created the discussion
"How to deploy an uncompressed service?"
To view the discussion, visit: http://community.jboss.org/message/534681#534681
--------------------------------------------------------------
I'm pretty much a beginner, so I kindly request that you be a little pacient with me.
I've "inherited" a handful of Axis2 web services deployed in a JBoss 5.0.1.GA environment. They work fine, except that a few require accessing media deployed within the WAR and EAR files, which JBoss complains is unaccessible -- unless I explicitly uncompress the file into a directory and rename it to the file's name after deleting the original deployed WAR file. The deployment is done under Eclipse Galileo.
Although this is a minor nuisance (opening up a console, uncompressing the WAR/EAR file contents, removing the original EAR/WAR file, renaming the directory to the original file's name), I can't help but think that there must an easier way that I completely missed. What are your experiences/suggestions on this regard?
Thank you in advance for your support.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534681#534681]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
Re: [jboss-user] [JBoss Microcontainer Development] - Issues using Javassist TypeInfoFactory in other projects
by Kabir Khan
Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] replied to the discussion
"Issues using Javassist TypeInfoFactory in other projects"
To view the discussion, visit: http://community.jboss.org/message/534679#534679
--------------------------------------------------------------
It looks like ReflectMethodImpl.setMethod() and ReflectFieldImpl.setField() do that already:
RMI:
public void setMethod(Method method)
{
boolean isDeclaringClassPublic = true;
if (method != null)
{
accessCheck(Modifier.isPublic(method.getModifiers()));
isDeclaringClassPublic = isDeclaringClassPublic(method);
accessCheck(isDeclaringClassPublic);
}
this.method = method;
if (method != null && (isPublic() == false || isDeclaringClassPublic == false))
setAccessible();
}
RFI:
public void setField(Field field)
{
if (field != null)
accessCheck(Modifier.isPublic(field.getModifiers()));
this.field = field;
if (isPublic() == false && field != null)
setAccessible();
}
Commenting out the whole block which threw the exception for JavassistMethodInfo, and setAccessible=true for ReflectMethodInfoImpl, works with both modes
org.jboss.test.kernel.deployment.support.StaticInjector:
private void injectToMethod(Class<?> clazz, String method, Object value, Class<?> signature, boolean isPublic) throws Throwable
{
ClassInfo classInfo = configurator.getClassInfo(clazz);
MethodInfo mi = Config.findMethodInfo(classInfo, method, new String[]{signature.getName()}, true, isPublic);
// if (isPublic == false)
// {
// // TODO - move this into Reflection?
// if (mi instanceof ReflectMethodInfoImpl)
// {
// ReflectMethodInfoImpl rmi = (ReflectMethodInfoImpl)mi;
// Method m = rmi.getMethod();
// m.setAccessible(true);
// }
// else
// throw new IllegalArgumentException("Cannot set accessible on method info: " + mi);
// }
mi.invoke(null, new Object[]{value});
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534679#534679]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years