mesX
asked on
Basic Question: Dynamic Java Classloading
Hi there,
i have a basic question, because i'm a java beginner:
Im working on a web project and my servlet needs to access some data from some "information-provider".
I want to write my servlet independend to the information-provider so i'm building a "info-bridge" bean which implements an interface.
I want to use an XML file, where i can configure what "info-bridge" java bean should be used (a bit like the spring-bean config stuff).
So i have the following XML:
<config>
<information-interface class="myJavaPackage.myPro ject.bridg es.provide r1Bridge" />
<config>
What is the best way to load the class from my servlet? Is it Java Reflection or is there any other technique (because i read that java reflection is not very fast) or is there maybe any built-in feature of apache tomcat? What is common??
thx for your help and best regards
manuel
i have a basic question, because i'm a java beginner:
Im working on a web project and my servlet needs to access some data from some "information-provider".
I want to write my servlet independend to the information-provider so i'm building a "info-bridge" bean which implements an interface.
I want to use an XML file, where i can configure what "info-bridge" java bean should be used (a bit like the spring-bean config stuff).
So i have the following XML:
<config>
<information-interface class="myJavaPackage.myPro
<config>
What is the best way to load the class from my servlet? Is it Java Reflection or is there any other technique (because i read that java reflection is not very fast) or is there maybe any built-in feature of apache tomcat? What is common??
thx for your help and best regards
manuel
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
:)
ASKER
regards!