Skip to main content

Home/ SoftwareEngineering/ Group items matching "driver" in title, tags, annotations or url

Group items matching
in title, tags, annotations or url

Sort By: Relevance | Date Filter: All | Bookmarks | Topics Simple Middle
kuni katsuya

How do I migrate my application from AS5 or AS6 to AS7 - JBoss AS 7.0 - Project Documentation Editor - 0 views

  • Configure changes for applications that use Hibernate and JPA
  • Update your Hibernate 3.x application to use Hibernate 4
  • Changes for Hibernate 3.3 applications
  • ...16 more annotations...
  • Changes for Hibernate 3.5 applications
  • if your application uses Hibernate 3 classes that are not available in Hibernate 4, for example, some of the validator or search classes, you may see ClassNotFoundExceptions when you deploy your application. If you encounter this problem, you can try one of two approaches: You may be able to resolve the issue by copying the specific Hibernate 3 JARs containing those classes into the application "/lib" directory or by adding them to the classpath using some other method. In some cases this may result in ClassCastExceptions or other class loading issues due to the mixed use of the Hibernate versions, so you will need to use the second approach. You need to tell the server to use only the Hibernate 3 libraries and you will need to add exclusions for the Hibernate 4 libraries. Details on how to do this are described here: JPA Reference Guide.
  • In previous versions of the application server, the JCA data source configuration was defined in a file with a suffix of *-ds.xml. This file was then deployed in the server's deploy directory. The JDBC driver was copied to the server lib/ directory or packaged in the application's WEB-INF/lib/ directory. In AS7, this has all changed. You will no longer package the JDBC driver with the application or in the server/lib directory. The *-ds.xml file is now obsolete and the datasource configuration information is now defined in the standalone/configuration/standalone.xml or in the domain/configuration/domain.xml file. A JDBC 4-compliant driver can be installed as a deployment or as a core module. A driver that is JDBC 4-compliant contains a META-INF/services/java.sql.driver file that specifies the driver class name. A driver that is not JDBC 4-compliant requires additional steps, as noted below.
  • DataSource Configuration
  • domain mode, the configuration file is the domain/configuration/domain.xml
  • standalone mode, you will configure the datasource in the standalone/configuration/standalone.xml
  • MySQL datasource element:
  •         <connection-url>jdbc:mysql://localhost:3306/YourApplicationURL</connection-url>        <driver-class> com.mysql.jdbc.driver </driver-class>        <driver> mysql-connector-java-5.1.15.jar </driver>
  •        <security>            <user-name> USERID </user-name>            <password> PASSWORD</password>        </security>
  • example of the driver element for driver that is not JDBC 4-compliant. The driver-class must be specified since it there is no META-INF/services/java.sql.driver file that specifies the driver class name.
  •  <driver-class>com.mysql.jdbc.driver</driver-class>
  • JDBC driver can be installed into the container in one of two ways: either as a deployment or as a core module
  • Install the JDBC driver
  • Install the JDBC driver as a deployment
  • In AS7 standalone mode, you simply copy the JDBC 4-compliant JAR into the AS7_HOME/standalone/deployments directory
  • example of a MySQL JDBC driver installed as a deployment:     AS7_HOME/standalone/deployments/mysql-connector-java-5.1.15.jar
kuni katsuya

Data Source Configuration in AS 7 | JBoss AS 7 | JBoss Community - 0 views

  • Data Source Configuration in AS 7
  • Using @DataSourceDefinition to configure a DataSource
  • This annotation requires that a data source implementation class (generally from a JDBC driver JAR) be present on the class path (either by including it in your application, or deploying it as a top-level JAR and referring to it via MANIFEST.MF's Class-Path attribute) and be named explicitly.
  • ...21 more annotations...
  • this annotation bypasses the management layer and as such it is recommended only for development and testing purposes
  • Defining a Managed DataSource
  • Installing a JDBC driver as a deployment
  • Installing the JDBC Driver
  • deployment or as a core module
  • managed by the application server (and thus take advantage of the management and connection pooling facilities it provides), you must perform two tasks.  First, you must make the JDBC driver available to the application server; then you can configure the data source itself.  Once you have performed these tasks you can use the data source via standard JNDI injection.
  • recommended way to install a JDBC driver into the application server is to simply deploy it as a regular JAR deployment.  The reason for this is that when you run your application server in domain mode, deployments are automatically propagated to all servers to which the deployment applies; thus distribution of the driver JAR is one less thing for administrators to worry about.
  • Note on MySQL driver and JDBC Type 4 compliance: while the MySQL driver (at least up to 5.1.18) is designed to be a Type 4 driver, its jdbcCompliant() method always return false. The reason is that the driver does not pass SQL 92 full compliance tests, says MySQL. Thus, you will need to install the MySQL JDBC driver as a module (see below).
  • Installing a JDBC driver as a module
  • <module xmlns="urn:jboss:module:1.0" name="com.mysql">  <resources>    <resource-root path="mysql-connector-java-5.1.15.jar"/>  </resources>  <dependencies>    <module name="javax.api"/>  </dependencies></module>
  • jboss-7.0.0.<release>/modules/com/mysql/main
  • define your module with a module.xml file, and the actual jar file that contains your database driver
  • content of the module.xml file
  • Under the root directory of the application server, is a directory called modules
  • module name, which in this example is com.mysql
  • where the implementation is, which is the resource-root tag with the path element
  • define any dependencies you might have.  In this case, as the case with all JDBC data sources, we would be dependent on the Java JDBC API's, which in this case in defined in another module called javax.api, which you can find under modules/javax/api/main as you would expect.
  • Defining the DataSource itself
  •    <datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS">      <connection-url>jdbc:mysql://localhost:3306/EJB3</connection-url>         <driver>com.mysql</driver>
  •     <drivers>      <driver name="com.mysql" module="com.mysql">        <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>      </driver>    </drivers>
  • jboss-7.0.0.<release>/domain/configuration/domain.xml or jboss-7.0.0.<release>/standalone/configuration/standalone.xml
kuni katsuya

Drivers and Downloads | Dell [United States] - 0 views

  • Win7 64 Graphics driver update 15.17.16.2302 for Cantiga M09 (except AMG) and E3 KrugMV 14/15
  • Windows 7 64-bit
  • Latitude E6500
  • ...8 more annotations...
  • Win7 64-bit driver 15.17.16 2302
  • E6500
  • - Improved DisplayPort monitor behavior (including non-Dell monitors)
  • - Fixed issue where system LCD defaults to Max brightness on Standby/resume, Hibernate/resume or reboot
  • - Improved DisplayPort monitor behavior (including non-Dell monitors)
  • - Improved mode persistence after
  • hot undock/redock
  • with a DVI monitor attaced
kuni katsuya

MySQL :: MySQL 3.23, 4.0, 4.1 Reference Manual :: 17.3.4.1 Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J - 0 views

  • useUnicode
    • kuni katsuya
       
      foo
    • kuni katsuya
       
      see also: http://www.diigo.com/ditem_mana2/read_ditem?link_id=124285330&url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F4.1%2Fen%2Fconnector-j-reference-charsets.html if characterEncoding is unspecified, jdbc driver sets it to the character set specified by the mysql system
  • defaults to 'true'
  • characterEncoding
  • ...2 more annotations...
  • If 'useUnicode' is set to true, what character encoding should the driver use when dealing with strings? (defaults is to 'autodetect')
    • kuni katsuya
    • kuni katsuya
       
      if characterEncoding is unspecified, jdbc driver sets it to the character set specified by the mysql system
kuni katsuya

Admin Guide - JBoss AS 7.0 - Project Documentation Editor - 0 views

  • JDBC Driver Installation
  • recommended way to install a JDBC driver into the application server is to simply deploy it as a regular JAR deployment
  •  
    Data
kuni katsuya

MySQL & Apache Derby as jdbcRealm for Apache Shiro | Nabil Hachicha - 0 views

  • http://localhost:8080/ShiroDemo/auth/secured.jsp
  • MySQL & Apache Derby as jdbcRealm for Apache Shiro
  • Step 1 creating a simple WebApp
  • ...36 more annotations...
  • Step 2 securing some content
  • create a database that will hold the list of the authorized users along with their password
  • Create a new directory “auth” and add a new JSP under it, let’s call it “BackOffice.jsp“
    • kuni katsuya
       
      create directory 'auth' under webapps directory
  • enable Shiro into our project by adding a ServletFilter into our Web.xml
  •  <filter-class>05            org.apache.shiro.web.servlet.IniShiroFilter06        </filter-class>
  • 10    <filter-mapping>11         <filter-name>ShiroFilter</filter-name>12         <url-pattern>/*</url-pattern>13    </filter-mapping>
  • classpath:shiro.ini
  • shiro-core
  • shiro-web
  • create shiro.ini under resource dir
  • 07ds.jdbcUrl=jdbc:derby://localhost:1527/shiro_schema08ds.username = APP09ds.password = APP
  • 15/auth/** = authcBasic16/** = anon
  • jdbcRealm.authenticationQuery
  • jdbcRealm=org.apache.shiro.realm.jdbc.JdbcRealm
  • setup the jdbc realm, this is where Shiro will find the authorized users
  • map the URLs to be protected, all the url under /auth should be authenticated with basic HTTP authentication
  • All the other URLs should be accessed without authentication
  • Add a new directory under src let’s call it production we will create a new shiro configuration file compatible with MySQL
    • kuni katsuya
       
      create src/production/resources/shiro.ini with contents below
  • 06ds.serverName = localhost07ds.user = ADM08ds.password = secret12309ds.databaseName = shiro_schema
  • jdbcRealm which use a MySQL driver
  • jdbcRealm.dataSource = $ds
  • jdbcRealm.dataSource=$ds
  • added the appropriate dependency to maven pom.xml
  • mysql-connector-java
  • environment.type
  • staging
  • 13                <jdbc.user>APP</jdbc.user>14                <jdbc.passwd>APP</jdbc.passwd>15                <jdbc.url>jdbc:derby://localhost:1527/shiro_schema</jdbc.url>16                <jdbc.driver>org.apache.derby.jdbc.Clientdriver</jdbc.driver>
  • src/main/resources
  • derbyclient
  • production
  • environment.type
  • 45                <jdbc.user>ADM</jdbc.user>46                <jdbc.passwd>secret123</jdbc.passwd>47                <jdbc.ds>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</jdbc.ds>48                <jdbc.serverName>localhost</jdbc.serverName>49                <jdbc.databaseName>shiro_schema</jdbc.databaseName>
  • src/production/resources
  • To build and run for staging
  • To build for production
  • -Denvironment.type=prod
kuni katsuya

MySQL :: MySQL 5.1 Reference Manual :: 21.3.5.1 Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J - 0 views

  • The name of the class that implements java.sql.Driver in MySQL Connector/J is com.mysql.jdbc.Driver
  • JDBC URL Format The JDBC URL format for MySQL Connector/J is as follows, with items in square brackets ([, ]) being optional: jdbc:mysql://[host][,failoverhost...][:port]/[database] » [?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]... If the host name is not specified, it defaults to 127.0.0.1. If the port is not specified, it defaults to 3306, the default port number for MySQL servers. jdbc:mysql://[host:port],[host:port].../[database] » [?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]... Here is a sample connection URL: jdbc:mysql://localhost:3306/sakila?profileSQL=true
  • Initial Database for Connection If the database is not specified, the connection is made with no default database
  • ...2 more annotations...
  • fully specify table names using the database name (that is, SELECT dbname.tablename.colname FROM dbname.tablename...) in your SQL
  • work with multiple databases
    • kuni katsuya
       
      including cross database joins
kuni katsuya

DataSource configuration - JBoss AS 7.0 - Project Documentation Editor - 0 views

kuni katsuya

log4jdbc - JDBC proxy driver for logging SQL and other interesting information. - Google Project Hosting - 0 views

  • for prepared statements, the bind arguments are automatically inserted into the SQL output
  • SQL timing information can be generated to help identify how long SQL statements take to run
  • included tool to produce profiling report data for quickly identifying slow SQL in your application
  • ...16 more annotations...
  • SQL connection number information is generated
  • change the driver class name to net.sf.log4jdbc.driverSpy
  • "jdbc:log4"
  • jdbc.sqlonly
  • jdbc.sqltiming
  • jdbc.audit
  • jdbc.resultset
  • jdbc.connection
  • only SQL
  • the SQL
  • timing statistics
  • ALL JDBC calls
  • very voluminous output
  • all calls to ResultSet objects
  • connection open and close events
  • useful for hunting down connection leak problems
kuni katsuya

Download Update for Windows 7 for x64-based Systems (KB976422) from Official Microsoft Download Center - 0 views

  • Update for Windows 7 for x64-based Systems (KB976422)
  • Install this update to support Secure Digital (SD) cards that are larger than 32 GB
kuni katsuya

JBoss AS7 Deployment Plugin - Deploy/Undeploy Examples - 0 views

  • Deploying your application
  • plugin goals deploy, undeploy, and redeploy
  • <plugin> <groupId>org.jboss.as.plugins</groupId> <artifactId>jboss-as-maven-plugin</artifactId> <version>7.1.1.Final</version> </plugin>
  • ...15 more annotations...
  • file listed under the filename parameter can be deployed to the server using the deploy goal
  • deploy
  • redeploy
  • undeploy
  • <phase>install</phase>
  • <goal>deploy</goal>
  • Deploying other artifacts
  • possible to deploy other artifacts that are not related to your deployment, e.g. database drivers:
  • <phase>install</phase>
  • <goal>deploy-artifact</goal>
  • <configuration> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <name>postgresql.jar</name> </configuration>
  • artifact must be already listed as a dependency in the projects pom.xml.
  • Deploying your application in domain mode.
  • add the domain tag as well as specify at least one server group.
  • <domain> <server-groups> <server-group>main-server-group</server-group> </server-groups> </domain>
kuni katsuya

MySQL :: MySQL 5.1 Reference Manual :: 21.3.5.2 JDBC API Implementation Notes - 0 views

  • Connection
  • If you need to determine if the connection is still valid, issue a simple query, such as SELECT 1. The driver will throw an exception if the connection is no longer valid.
kuni katsuya

Admin Guide - JBoss AS 7.1 - Project Documentation Editor - 0 views

  • Deployment of -ds.xml files
  • Starting with JBoss Application Server 7.1.0.Final you have the ability to deploy a -ds.xml file following the schema: http://docs.jboss.org/ironjacamar/schema/datasources_1_1.xsd It is mandatory to use a reference to an already deployed / defined <driver> entry.
kuni katsuya

DataSource configuration - JBoss AS 7.1 - Project Documentation Editor - 0 views

  • /subsystem=datasources:read-resource(recursive=true)
  • /subsystem=datasources:installed-drivers-list
  • DataSource configuration
  •  
    /subsystem=datasources:read-resource(recursive=true)
kuni katsuya

Preventing SQL Injection in Java - OWASP - 0 views

  • Preventing SQL Injection in Java
  • inject (or execute) SQL commands within an application
  • Defense Strategy
  • ...19 more annotations...
  • To prevent SQL injection:
  • All queries should be
  • parametrized
  • All dynamic data
  • should be
  • explicitly bound to parametrized queries
  • String concatenation
  • should never be used
  • to create dynamic SQL
  • OWASP SQL Injection Prevention Cheat Sheet.
  • Parameterized Queries
  • Prepared Statements
  • automatically be escaped by the JDBC driver
  • userId = ?
  • PreparedStatement
  • setString
  • Dynamic Queries via String Concatenation
  • never construct SQL statements using string concatenation of unchecked input values
  • dynamic queries via the java.sql.Statement class leads to SQL Injection
1 - 17 of 17
Showing 20 items per page