B.6.3. MySQL Using a Named Pipe

Example B.22. MySQL Using a Named Pipe

This example uses a database hosted locally, but uses a named pipe instead of TCP/IP.
<datasources> 
  <local-tx-datasource> 
    
    <jndi-name>MySQLDS</jndi-name> 
    <connection-url>jdbc:mysql://./database</connection-url> 
    <driver-class>com.mysql.jdbc.Driver</driver-class> 
    
    <user-name>username</user-name> 
    <password>secret</password> 
    
    <connection-property name="socketFactory">com.mysql.jdbc.NamedPipeSocketFactory</connection-property> 

    <metadata> 
      <type-mapping>mySQL</type-mapping> 
    </metadata> 
    
  </local-tx-datasource> 
</datasources>