[jboss-user] [Installation, Configuration & Deployment] - Re: jndi, rebind, java.io.NotSerializableException
do-not-reply at jboss.com
Thu Nov 19 03:08:48 EST 2009
Not possible. I already found this class, but it has two main problem.
First, it introduces a dependency to jboss in my code, while i would like to stick with pure J2EE available specs.
Second, this mean changing eveywhere my code calls like context.lookup(name) to something like NonSerializableFactory.lookup(name). I'd like not to change the code just because jboss has decided tha purely local objects need to be serialized.
This doc http://docs.jboss.org/jbossas/admindevel326/html/ch3.chapter.html states
anonymous wrote : Subcontexts and object bindings directly under java: are only visible within the JBoss server virtual machine and not to remote clients. Any other context or object binding is available to remote clients, provided the context or object supports serialization. [....]
| An example of where the restricting a binding to the java: context is useful would be a javax.sql.DataSource connection factory that can only be used inside of the JBoss server where the associated database pool resides.
I see nowhere that is mandates objets are serializable and even if so, the only mention of serialization is about other context, not java: ones. However, the jboss still complains about serialization and fail while i bind an object to the name "java:Shark". Note that i tried "java:Shark", "java:comp/env/Shark" and "Shark", all are failing with serialization errors.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266469#4266469
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266469
More information about the jboss-user