Professional Documents
Culture Documents
JDBC Jndi Jms Jts
JDBC Jndi Jms Jts
===============================
advantages:
---------------
the jdbc api can be used to interact with multiple data sources in a
distributed, heterogenous environment.
it can connect to any of the database from java language.
it can switch over to any backend database without changing java code or by
minute changes.
this type of jdbc drivers provides a bridge between jdbc api and odbc api.
this bridge(jdbc-odbc bridge) translates standard jdbc calls to corresponding
odbc calls, and
send them to odbc database via odbc libraries.
the url and class to be loaded for this type of driver are
class :- sun.jdbc.odbc.jdbcodbcdriver
url :- jdbc:odbc:dsnname
when database call is made using jdbc,the driver translates the request into
vendor-specific api calls.
the database will process the requet and sends the results back through the
native api ,which will
forward them back to the jdbc dirver. the jdbc driver will format the results
to conform to the jdbc
standard and return them to the application.
the java client application sends the calls to the intermediate data access
server(jdbc driver server)
the middle tier then handles the requet using other driver(type-ii or type-iv
drivers) to complete the request.
7. what are the advantages & disadvantages of type-2 ,type-4 drivers over jdbc-
odbc bridge driver(type-1)?
a. type-2 & type-4 are given
<subname> -------> the syntax of the subname is driver specific. the driver
may choose any
syntax appropriate for its implementation
ex: jdbc:odbc:dsn
jdbc:oracle:oci8:@ database name.
jdbc:orale:thin:@ database name:port number:sid
11.what are the types of resultsets in jdbc3.0 ?how you can retrieve information
of resultset?
a. scrollableresultset and resultset.we can retrieve information of resultset by
using java.sql.resultsetmetadata interface.you can get the instance by calling the
method getmetadata() on resulset object.
statement s=c.createstatement();
(or)
preparedstatement p=c.preparestatement();
(or)
callablestatement cal=c.prparecall();
level means:-
24.in which interface the methods commit() & rollback() are defined ?
a.java.sql.connection interface
28.what is a connection?
a. connection is an interface which is used to make a connection between client
and database (ie opening a session with a particular database).
fetching queries are the queries which are used to fetch the records from
database (ie which returns resutset)
ex: select * from emp.
3. what was the technology for messaging services before jms was released?
a. before jms api specification was released by javasoft ,there was
ibm's mqseries implementation of mom (message-oriented middleware).
5. how many types of data passing does jms specification allows ?what are they?
a. jms specification allows two types of data passing.
a)publish/subscribe [pub/sub model]
b)point-to-point [p-t-p model]
non-durablesubscription :-
-----------------------
non-durablesubscription will not recive the messages published when the
client connection is not active.
2. what is jta ?
a. jta (java transaction api) is the api released by javasoft under j2ee.
it was released after the release of jts .