Guogang Fan

Greenhorn
+ Follow
since Aug 17, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Guogang Fan

you can also parse the Json String at client side then send the server what you need.
11 years ago
JSP
you can parse the String yourself with those String functions defined in java.lang.String.
or you can use some Java library to do it
www.json.orghave introduced many java api to handle json .
11 years ago
JSP
when we bind a datasource object to a Name within a context,is that means the datasource was converted into byte stream and stored in somewhere?
when we lookup a object by it's Name,is that means we revert the byte stream back to a Object ?

but i saw the tomcat source code ,bindings is just a HashMap .

some one please help me to understand it.

sorry for my poor english.
11 years ago
When tomcat running,we can get a connection from a datasource .

where the datasource come from?

is that some thread started by tomcat always running ,when web app request a connection ,the thread provide it from it's connection pool?

11 years ago

Freddy Wong wrote:You need to implement your own javax.sql.DataSource and you don't need it to bind it to the JNDI if you don't want to.

Alternatively, you can use Spring The org.springframework.jdbc.datasource.DriverManagerDataSource in Spring implements javax.sql.DataSource.


thanks 4 your information ,but i still dont understand .
then how can I get a datasource Object?
within a JNDI context ,I can lookup ...If I do like you said ,in a web app, how will my datasource be managed in the servlet context ?

---sorry for my poor english
hi guys !help me out
I want to set up a datasource but not bind it in a JNDI context.
I hope the datasource is only visible to my app.
I mean a datasource is ready to provide connection for my app,but not within JNDI.
how to do this ?