-
Aug 20th, 2010, 03:43 AM
#1
Hoeller, How JndiObjectFactoryBean avoid ClassCastException?
Hey Hoeller:
I binded a custom service(a pojo) to the JNDI context in one Web Application.
Then I get the reference to the service from the JNDI context from the other Web Application.
Because the current classloader in JSP is different from the classloader of the binding service from JNDI.
So when I cast the type in JSP, ClassCastException is thrown.
But when I use JndiObjectFactoryBean to access the service from the JNDI, It works well.
I don't understand how it can avoid the ClassCastException?
Last edited by wangyin; Aug 21st, 2010 at 01:32 AM.
-
Aug 21st, 2010, 01:33 AM
#2
-
Aug 24th, 2010, 12:30 AM
#3
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules