The secret to creativity is knowing how to hide your sources.
Originally posted by Faisal Khan:
Ahamed,
The issue of database connectivity is very important and it depends on what exactly you want to do with Java Beans and JDBC. Most containers provide you with database pools, such as Tomcat JNDI DataSource.
For managing the connection pools etc, that is what you should use. For specific desing, I am still trying to learn how I should make use of design pattern such as DAO.
HTH
Originally posted by Ahamed Sharif:
My Design pattern is one java bean class read the data from data base table in a data base server. How Java bean communicate with data base?
is it any design pattern is available or any online tutorial for Java Bean
with JDBC communication to the data base server.
The secret to creativity is knowing how to hide your sources.
Originally posted by Faisal Khan:
Ahamed,
Can you please specify the following:
1. what servlet container / app server you using?
2. what database server you using?
3. Do you want a connection each time or have a pool of connections
There are tonnes of tutorials on this subject matter but you will need to be more specific.
HTH
Originally posted by Ahamed Sharif:
Salam Faisal,
Actually i am developing gateway technolgy. The gate way is a component
based gateway, so i have to use java beans or EJB but i am prefering java beans. Because i am not sure about EJB implementation.
1. I am using Tomcat + Axis
Axis is for Webservices that is later part.
2. I am using Mysql data base.
3. I need both, because first I have to test each time after that
i will go with pooilg connection.
My first part is to develope a component that component read the
data from the mysql data base tabel and then that data pass it to some
other database server through gate way.
So give me suggestions how to start this task and I need any
good tutorials or any old projects related to this topic, if you
have please send me the url, would be really grateful.
Allah hafiz,
Ahamed
The secret to creativity is knowing how to hide your sources.
Originally posted by Faisal Khan:
Salaam Ahamed
I see what you need to do now. I am not sure how far you have got into your setup but after installing Tomcat and MySQL and getting them both to work, you need to get a JDBC driver (i recommned Connector/J from: http://www.mysql.com/products/connector-j/index.html).
The documentation of Connector/J will tell you how to test a single connection and query using a Java class: http://www.mysql.com/documentation/connector-j/index.html
After that follow the instructions in: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html to get your self setup using JNDI DataSource.
HTH
in Java already they defined JDBC API for conncting to dabase server. So why again I need Connector/J JDBC driver?.
in java beans JNDI is required to call beans? Because i know in EJB requires JNDI for lookup, in java beans also the same thing JNDI lookup?? once I make the components in java bans then in client programs i need JNDI lookup to find the server components like EJB or what is the concept of the java beans components??
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Would you turn that thing down? I'm controlling a mind here! Look ... look at the tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|