Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training Big Data and Hadoop Training Java Training  
 

Cmp Bean

Ads

 
 

Share on Google+Share on Google+

poonkothai
Cmp Bean
1 Answer(s)      8 years ago
Posted in : EJB
Ads
View Answers

January 31, 2009 at 1:38 AM


Hi
I am sending code, it will help you to understand the connection from sql server database table.

import java.sql.*;

public class Test {
public Test() throws Exception {
DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://<Host>:1433",<"UID>","<PWD>";);

if (connection != null) {
System.out.println();
System.out.println("Successfully connected");
System.out.println();
DatabaseMetaData meta = connection.getMetaData();
System.out.println("\nDriver Information");
System.out.println("Driver Name: " + meta.getDriverName());
System.out.println("Driver Version: " + meta.getDriverVersion());
System.out.println("\nDatabase Information ");
System.out.println("Database Name: " + meta.getDatabaseProductName());
System.out.println("Database Version: "+ meta.getDatabaseProductVersion());
}
}

public static void main (String args[]) throws Exception {
Test test = new Test();
}
}

Thanks..

Ads









Related Tutorials/Questions & Answers:
Cmp Bean - EJB
Cmp Bean   I want to create connection pool in admin console in sun app server the data base is sql server, I gave the resource type is javax.sql.DataSource, and the datasource class name is came automatically called
Chapter 7. CMP Entity Bean Life Cycle
Chapter 7. CMP Entity Bean Life CyclePrev Part ...;CMP Entity Bean Life CycleIdentify correct and incorrect statements or examples about the life cycle of a CMP entity bean
Advertisements
Identify the interfaces and methods a CMP entity bean must and must not implement.
Identify the interfaces and methods a CMP entity bean must and must... the interfaces and methods a CMP entity bean must and must not implement. ...;Chapter 7. CMP Entity Bean Life Cycle
Identify correctly-implemented deployment descriptor elements for a CMP bean (including container-managed relationships).
deployment descriptor elements for a CMP bean (including container-managed...-Managed Persistence (CMP) Next     Identify correctly-implemented deployment descriptor elements for a CMP bean
From a list, identify the purpose, behavior, and responsibilities of the bean provider for a CMP entity bean, including but not limited to: setEntityContext, unsetEntityContext, ejbC
of the bean provider for a CMP entity bean, including but not limited..., ejbFind, ejbHome, and ejbSelect. Prev Chapter 7. CMP Entity Bean... provider for a CMP entity bean, including but not limited
Identify correct and incorrect statements or examples about the rules and semantics for relationship assignment and relationship updating in a CMP bean.
in a CMP bean. Prev Chapter 6. Component Contract... for relationship assignment and relationship updating in a CMP bean. The assignment... schema type of a CMP entity bean.  Home Match the name
From a list, identify the responsibility of the container for a CMP entity bean, including but not limited to: setEntityContext, unsetEntityContext, ejbCreate, ejbPostCreate, ejbActi
. Prev Chapter 7. CMP Entity Bean Life Cycle Next ... of the container for a CMP entity bean, including but not limited... of the bean provider for a CMP entity bean, including but not limited
Identify correct and incorrect statements or examples about persistent relationships, remove protocols, and about the abstract schema type of a CMP entity bean.
of a CMP entity bean. Prev Chapter 6. Component Contract for Container-Managed Persistence (CMP) Next    ... assignment and relationship updating in a CMP bean
Identify the use, syntax, and behavior of, the following entity bean home method types, for Container-Managed Persistence (CMP); finder methods, create methods, remove methods, and home me
bean home method types, for Container-Managed Persistence (CMP... the use, syntax, and behavior of, the following entity bean home method types, for Container-Managed Persistence (CMP); finder methods, create
Bean
Bean  what is bean? how to use bean   HTML Code: Contents MOBILE STORE HOME PRODUCTS IMAGES COMPANY BRANCHES DEALERS FEEDBACK       Username       Password
Chapter 6. Component Contract for Container-Managed Persistence (CMP)
the entity bean provider's view and programming contract for CMP, including the requirements for a CMP entity bean. An entity bean implements... persistence (CMP) typically consists of its entity bean class; a component
entity bean
entity bean  can any one tell me how to develop and execute ---------- j2ee entity beans (cmp,bmp) example in weblogic server with (netbeans.../ejb/entity-bean-example.shtml
Managed Bean
Managed Bean  What is Managed Bean
Java Bean
Java Bean  How to run java bean program in Netbeans
Java Bean
Java Bean  What is a Java Bean?   A Java Bean is a software component that has been designed to be reusable in a variety of different environments
Java Bean
Java Bean  What is Java Bean?   I got my answer already here: http://www.roseindia.net/jsp/usingbeansinjsp.shtml Thanks a lot
Mean by Bean Scope
Mean by Bean Scope  What is Bean Scope
Version of bean-displaytag>bean-displaytag dependency
List of Version of bean-displaytag>bean-displaytag dependency
bean object
bean object  i have to retrieve data from the database and want to store in a variable using rs.getString and that variable i have to use in dropdown... java.util.*; public class Bean { public List dataList(){ ArrayList list=new
What is Bean Factory ?
What is Bean Factory ?  Hi, What is Bean Factory ? Thanks
What is bean wiring?
What is bean wiring?  Hi, What is bean wiring? Thanks
Session Bean
is a Session bean   A session bean is the enterprise bean that directly.... A session bean represents a single client accessing the enterprise application.... A session bean makes an interactive session only for a single client and shields
bean area - SQL
bean area  how to print bean area in excel sheet from oracle forms
JSF Manage Bean
JSF Manage Bean   how to register JSF manage bean? Please give me an example. Thanks!   JSF Manage Bean Example
Special Bean Types of WebApplicationContext
In this section, you will learn about Special Bean Types in the WebApplicationContext
Spring bean annotation example
Spring bean annotation example  Hi, How to configure Bean using... to configure it. If you have a bean with following definition: package net.roseindia...(){ System.out.println("Hello"); } } Now to configure it as Bean you can use the @Bean
bean - JSP-Interview Questions
bean  what is use bean in jsp?  Hi Friend, Please visit the following links: http://www.roseindia.net/jsp/using-bean-counter.shtml http://www.roseindia.net/jsp/java-bean-example-jsp.shtml Hope
Java Bean Properties
Java Bean Properties  What are the properties of a normal java Bean(Not EJB)   HI Friend, Please visit here: http://www.roseindia.net/jsp/usingbeansinjsp.shtml Thanks
JAVA BEAN WITH ORACLE FORMS
JAVA BEAN WITH ORACLE FORMS  Hi..I am doing my final year Project.. I need the ste-by-step procedure to integrate a bean with oracle forms? Please help me