Hi:

I currently access databases using servlets in the old fashioned 
way.  like this:

                
Class.forName("com.sybase.jdbc.SybDriver").newInstance();
                String url = 
"jdbc:sybase:Tds:localhost:2638/?JCONNECT_VERSION=4";
                Properties _props = new Properties();
                _props.put("user", "myName" );
                _props.put("password", "myPassword" );
                _props.put("DYNAMIC_PREPARE", "true");
                Connection con = DriverManager.getConnection(url, 
_props);

 
I wrote my own database poolinig method etc.

However,  from what you guys are saying, you can configure orion 
to automatically use databases right?  My question is how do I 
configure it?  In the data-sources.xml file how would I configure it 
for the above example?  And can it do automatic database pooling? 
 How do you configure that?

        <data-source 
class="com.evermind.sql.ConnectionDataSource" 
location="jdbc/DefaultDS">

<name>????</name>

<description>

This is a generic data-source that takes it's generates Connections 
                        with ordinary JDBC 2.0 drivers.
</description>
                
<url>jdbc:sybase:Tds:localhost:2638/?JCONNECT_VERSION=4</u
rl>
<connection-driver>com.sybase.jdbc.SybDriver</connection-driver>
                <username>myName</username>
                <password>myPassword</password>
</data-source>


Also, can someone send me an example of how to configure it for 
hypersonic SQL.


I have one more question:  How do my servlets then access the 
data?  What does the code look like?

Or is this just exposing the database connection to the network 
somehow?  Like do you directly "log-on" to the database over the 
internet etc?

How did you guys learn about this stuff?  Where do I get 
documentation?

Thanks,
Eric C




Reply via email to