My project has several deployed artifacts as ear files. My understanding is that each of the ears will have it's own classloader. Is it possible to tell weblogic to use the same classloader for each of these deployables.
What factors do i need to consider when making this change?
...
I'm trying to switch the class loader at runtime:
public class Test {
public static void main(String[] args) throws Exception {
final InjectingClassLoader classLoader = new InjectingClassLoader();
Thread.currentThread().setContextClassLoader(classLoader);
Thread thread = new Thread("test") {
publi...
I'm trying to migrate application from jdk 1.5 to jdk 1.6 without introducing any changes visible to the end user.
Application's output is an xml generated using jaxp which is a part of the jdk libraries. Since jaxp versions are different in jdk 1.5 and 1.6, the resulting xml looks different in each version.
An example: DatatypeFatory....
Our commercial application used to run on different application server and letely we started adjust it to run on JBoss server.
The problem is that that application runs JBoss cache and as part of the integration with this framework, the web-inf\lib contains the follwing jars:
jboss-aop.jar, jbosscache-core.jar, jboss-common.jar, jboss-c...
Hey all,
I'm currently writing a simple JSF 2 app for WAS 7. When I define the bean via the faces-config.xml, everything works great
<managed-bean>
<managed-bean-name>personBean</managed-bean-name>
<managed-bean-class>com.prototype.beans.PersonBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</m...
I'd like to know if the default behavior of JBoss server (4.2.3.GA in my case) is loading the classes in parent-first or parent-last mode.
And in case it work as I suspect in parent-last mode (i.e. first trying to load classes from the application's WEB-INF/lib and only if they are not found go to server\lib), how can I configure it to w...
The environment is WAS 6.1 on Linux, deploying a webapp that uses
classes from xercesImpl.jar.
Due to company policy restrictions, the app must be deployed with
settings:
Class Loader Order
Classes loaded with parent class loader first
-> Classes loaded with application class loader first
WAR class loader policy
Class loader ...
I looked at this article that talks about JBoss class-loading, but still got scenario that I'd like to verify:
in case I have got a utility class that is located both in the application's archive (myApp/WEB-INF/lib) and in the server/default/lib but with different version in each one of the archives.
Now I'd like that classes from my ...
How can I load a class that is already on the class path, instantiate it, and also instantiate any inner classes defined within it?
EG:
public class TestClass {
public class InnerClass { }
}
...
My Understanding
Static block is executed during class loading, If a class is already loaded then there is no way to load the class other than class reloading
Doubt/Question
1) Is there any time JVM reloads the class?
My Understanding
In Class Loading JVM loads bytecode of the Java file, so it can not keep all thousands classes byteco...
I have the following snippet of java code:
final Class<?> junitCoreClass = AccessController.doPrivileged(
new PrivilegedAction<URLClassLoader>() {
@Override
public URLClassLoader run() {
return new URLClassLoader(new URL[] { junitJarUrl });
}
}).loadClass("org.junit.runner.JUnitCore");
System.out.print...
In tomcat web container spring listens to session and executes a destroy-method on a "session-scoped" bean, that invokes a web-service.
sometimes this strange exception is raised:
interface com.sun.xml.ws.developer.WSBindingProvider is not visible from class loader
What can this mean?
...
We bundle the BIRT runtime with our application(EAR file) and everything was fine with version 2.2 which we were using until recently. However when we upgraded to BIRT 2.5.1 we are running into class loading issues.
The BIRT runtime packages a xerces.jar file which is the root cause for the class loading conflict becuase there is anothe...
Hi,
I have read a lot about the Java class loading process lately. Often I came across texts that claimed that it is not possible to add classes to the classpath during runtime and load them without class loader hackery (URLClassLoaders etc.)
As far as I know classes are loaded dynamically. That means their bytecode representation is o...
I am familiar with obtaining the contents of a properties file given the name of the file, and obviously MyClass.class.getResource('*.properties') will not work, but how can I obtain a list of ALL the properties files located in the same package as my class?
...
I'm trying some stuff out in Android and I'm stuck at when trying to cast a class in another .apk to my interface. I have the interface and various classes in other .apks that implement that interface. I find the other classes using PackageManager's query methods and use Application#createPackageContext() to get the classloader for that ...
After the introduction of Java Memory Model, the Swing guidelines were changed to state that any Swing components need to be instantiated on the EDT in order to avoid non-published instance state.
What I could not find anywhere is whether the classloading is also mandated to be on the EDT or can we pre-load key Swing classes in a backg...
Hi,
First of all, this is Java 1.4 (project restrictions).
I'm trying to create a application manager.
It loads each application's main class using it's own instance of a custom classloader.
After that, it creates an instance of the main class using reflection.
Each application implements a common interface so after the instance is crea...
How can I add JDBC drivers at runtime to Jython? Using CLASSPATH works, but using sys.path doesn't work with zxJDBC even though the class is imported fine and can be manipulated from the Jython interpreter prompt.
Why does this work:
$ CLASSPATH=/tmp/jtds\-1.2.5.jar ./jython
*sys-package-mgr*: processing new jar, '/private/tmp/jtds-1.2...
I'm wondering if and how one can load dex or class files dynamically
in dalvik, some quick'n'dirty test function I wrote was this:
public void testLoader() {
InputStream in;
int len;
byte[] data = new byte[2048];
try {
in = context.getAssets().open("f.dex"); ...