[EJB/JBoss] - RMI Dynamic Classloading
by dubacher
Hi there.
I have a problem when using the dynamic classloading feature of RMI for a non RMI-Class.
Note:
- The "WebService" which provides the class is up and running on the port 8083.
- I use jboss-4.2.2
The first problem:
When the class X to be loaded dynamically is sent as instance to the client, the codebase is not set correctly to the WebServer running on port 8083. Instead the codebase comprises loads of "file:/...."-URLs. Therefore when the class X has to be loaded the client does not try to dynamically load the class from the server running on port 8083.
I patched the class MarshalInputStream so that the codebase is set correctly on the client side. After having applied the patch the client now tries to load the class from the server...
now the second problem:
I sniffed the port 8083. The following HTTP get call is performed:
GET /org/foo/bar/X.class HTTP/1.1
User-Agent: Java/1.6.0_05
Host: delgado:8083
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Which is answered by the server with:
HTTP/1.0 404 Not Found
Content-Type: text/html
I debugged the WebServer code and found out that classloader returned by the call "Thread.currentThread().getContextClassLoader();" is not able to load my class X.
Any hints to my problem are appreciated.
cheers,
marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161898#4161898
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161898
17 years, 3 months
[Clustering/JBoss] - clustering best practices
by morphy
Hello,
i'm going tol design and develop an application under Jboss 4.2.2 that's required to be distributable over a jboss cluster
i've read (mmm read... not studied...) the clustering guide but i've still some questions:
is there some guide about best practices?
where should the datasource be deployed? in the 'deploy' or 'has-singleton' directory?
if the deploy should be done in the 'deploy' directory... must the datasource be a XA datasource?
which are the key points in the configuration of the persistence unit in persistence.xml JPA config file?
which is the behavior of the timer service? is it singleton in the all configuration or every node has its scheduler? will it be handled by a stateless bean deployed as singleton?
thank you in advance
every hint will be greatly appreciated
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161895#4161895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161895
17 years, 3 months