Showing entries 1 to 9
Displaying posts with tag: Java Enterprise (reset)
Introducing the DataSourceDefinition Annotation

One of the many cool new features in Java EE 6, is support for the DataSourceDefinition annotation.

The DataSourceDefinition annotation provides a way to define a DataSource and register it with JNDI. The annotation provided annotation elements for the commonly used DataSource properties. Additional standard and vendor specific properties may also be specified.

So let us look at an example:

@DataSourceDefinition(name = "java:global/MyApp/myDS",

className = "org.apache.derby.jdbc.ClientDataSource",

portNumber = 1527,

serverName = "localhost",

databaseName = "testDB",

user = "lance",

password = "secret",

properties = {"createDatabase=create"}) )

The data source will be registered using the value specified in the name element and can be defined in any valid Java EE name space and that will determine the accessibility of the data …

[Read more]
Introducing the DataSourceDefinition Annotation

One of the many cool new features in Java EE 6, is support for the DataSourceDefinition annotation.

The DataSourceDefinition annotation provides a way to define a DataSource and register it with JNDI. The annotation provided annotation elements for the commonly used DataSource properties. Additional standard and vendor specific properties may also be specified.

So let us look at an example:

@DataSourceDefinition(name = "java:global/MyApp/myDS",
className = "org.apache.derby.jdbc.ClientDataSource",
portNumber = 1527,
serverName = "localhost",
databaseName = "testDB",
user = "lance",
password = "secret",
properties = {"createDatabase=create"}) )

The data source will be registered using the value specified in the name element and can be defined in any valid Java EE name space and that will determine the accessibility of the data source from other …

[Read more]
Introducing the DataSourceDefinition Annotation

One of the many cool new features in Java EE 6, is support for the DataSourceDefinition annotation.

The DataSourceDefinition annotation provides a way to define a DataSource and register it with JNDI. The annotation provided annotation elements for the commonly used DataSource properties. Additional standard and vendor specific properties may also be specified.

So let us look at an example:

@DataSourceDefinition(name = "java:global/MyApp/myDS",

className = "org.apache.derby.jdbc.ClientDataSource",

portNumber = 1527,

serverName = "localhost",

databaseName = "testDB",

user = "lance",

password = "secret",

properties = {"createDatabase=create"}) )

The data source will be registered using the value specified in the name element and can be defined in any valid Java EE name space and that will determine the accessibility of the data …

[Read more]
MySQL Connector/C++ 1.0.1 Alpha Released offering a JDBC API for MySQL C++ developers

The MySQL Connector/C++ Connector project has successfully reached its first major milestone by releasing its Alpha version.

The Connector provides a C++ implementation modeled after JDBC. This allows developers who have worked with JDBC to quickly take advantage of this Connector minimizing the learning curve.

The current release provides support for many of the methods found in the following JDBC interfaces:

  • java.sql.Connection
  • java.sql.DatabaseMetaData
  • java.sql.Driver
  • java.sql.PreparedStatement
  • java.sql.ResultSet
  • java.sql.ResultsetMetaData
  • java.sql.Savepoint
  • java.sql.Statement

Examples of using MySQL Connector/C++

Here is an example which connects to a MySQL Server, creates a table and then inserts a row into the table

      sql::mysql::MySQL_Driver *driver;
[Read more]
MySQL Connector/C++ 1.0.1 Alpha Released offering a JDBC API for MySQL C++ developers

The MySQL Connector/C++ Connector project has successfully reached its first major milestone by releasing its Alpha version.

The Connector provides a C++ implementation modeled after JDBC. This allows developers who have worked with JDBC to quickly take advantage of this Connector minimizing the learning curve.

The current release provides support for many of the methods found in the following JDBC interfaces:

  • java.sql.Connection
  • java.sql.DatabaseMetaData
  • java.sql.Driver
  • java.sql.PreparedStatement
  • java.sql.ResultSet
  • java.sql.ResultsetMetaData
  • java.sql.Savepoint
  • java.sql.Statement

Examples of using MySQL Connector/C++

Here is an example which connects to a MySQL Server, creates a table and then inserts a row into the table

      sql::mysql::MySQL_Driver *driver; …
[Read more]
MySQL Connector/C++ 1.0.1 Alpha Released offering a JDBC API for MySQL C++ developers

The MySQL Connector/C++ Connector project has successfully reached its first major milestone by releasing its Alpha version.

The Connector provides a C++ implementation modeled after JDBC. This allows developers who have worked with JDBC to quickly take advantage of this Connector minimizing the learning curve.

The current release provides support for many of the methods found in the following JDBC interfaces:

  • java.sql.Connection
  • java.sql.DatabaseMetaData
  • java.sql.Driver
  • java.sql.PreparedStatement
  • java.sql.ResultSet
  • java.sql.ResultsetMetaData
  • java.sql.Savepoint
  • java.sql.Statement

Examples of using MySQL Connector/C++

Here is an example which connects to a MySQL Server, creates a table and then inserts a row into the table

      sql::mysql::MySQL_Driver *driver;
[Read more]
Moving Tomcat Toplink Apps to Glassfish v3 Prelude

With Glassfish V3 and Netbeans 6.5, it is easy to move applications which run on Tomcat using Toplink/EclipseLink to Glassfish v3 Prelude.

The sample application contained in the zip file JPAWeb_TC6_Toplink-1.zip, is a simple web app using JSTL, Servlet, JSP and TopLink Essentials to store contact information into a MySQL database.

To Deploy and run the application on Tomcat, you need place a copy of the MySQL JDBC driver in $TOMCAT_HOME/lib and have a MySQL database which is accessible and that you have permissions to create tables in.

The application uses JNDI to access a Data Source defined on Tomcat (in our case via the context.xml). This requires you to use specify the Toplink property toplink.session.customizer in your persistence.xml indicating …

[Read more]
Moving Tomcat Toplink Apps to Glassfish v3 Prelude

With Glassfish V3 and Netbeans 6.5, it is easy to move applications which run on Tomcat using Toplink/EclipseLink to Glassfish v3 Prelude.

The sample application contained in the zip file JPAWeb_TC6_Toplink-1.zip, is a simple web app using JSTL, Servlet, JSP and TopLink Essentials to store contact information into a MySQL database.

To Deploy and run the application on Tomcat, you need place a copy of the MySQL JDBC driver in $TOMCAT_HOME/lib and have a MySQL database which is accessible and that you have permissions to create tables in.

The application uses JNDI to access a Data Source defined on Tomcat (in our case via the context.xml). This requires you to use specify the Toplink property toplink.session.customizer in your persistence.xml indicating that …

[Read more]
Moving Tomcat Toplink Apps to Glassfish v3 Prelude

With Glassfish V3 and Netbeans 6.5, it is easy to move applications which run on Tomcat using Toplink/EclipseLink to Glassfish v3 Prelude.

The sample application contained in the zip file JPAWeb_TC6_Toplink-1.zip, is a simple web app using JSTL, Servlet, JSP and TopLink Essentials to store contact information into a MySQL database.

To Deploy and run the application on Tomcat, you need place a copy of the MySQL JDBC driver in $TOMCAT_HOME/lib and have a MySQL database which is accessible and that you have permissions to create tables in.

The application uses JNDI to access a Data Source defined on Tomcat (in our case via the context.xml). This requires you to use specify the Toplink property toplink.session.customizer in your persistence.xml indicating that a SessionCustomizer will be used so that the lookup type on the JNDI …

[Read more]
Showing entries 1 to 9