• Post Reply Bookmark Topic Watch Topic
  • New Topic

ClassLoader puzzles  RSS feed

 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We had a good thread on class loaders and casting errors. Here's some code in my work life. This code is in a static method StrategyFactory ...

I'm trying to remember or figure out why this was necessary. I think: The loader that loaded StrategyFactory knew the application classpath that could find the strategy classes. But the current default loader only knew the classpath from when WebSphere started. But how could my application assembler call the static method if that's true?

Does any of that makes sense? I'm not sure how the application assembler is fired off at server startup. Maybe the answer is there.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!