Administrator Guide

Overview

The JDBC plug-in is an extension for the jWebSocket framework to provide support for database management operations in WebSocket applications. This client-side plug-in provides the API to access the features of the JDBC plug-in on the jWebSocket server, through which you can to run any query on server database simply and easily.

Download

For the installation of the JDBC plug-in, the user should be downloading the packages containing in the jWebSocket server. The user can find that in our Download area.

Installation environment

  1. The Java Virtual Machine and Java Development Kit (Sun JDK | OpenJDK) 1.6 version or higher installed.
  2. A Web server (e.g. Apache) installed to publish the Web applications.
  3. An IDE to develop Java applications (e.g NetBeans or Eclipse).

Installation process

  1. Download jWebSocketJDBCPlugIn package from the address noted above.
  2. Unzip the downloaded package to a selected directory. For example you can unzip the jWebSocketJDBCPlugIn package in a folder located in C:/Programs Files/jWebSocket if you use Windows OS, otherwise if you use Unix OS you can unzip the jWebSocketJDBCPlugIn package in a folder located in /usr/lib/jWebSocket
  3. Create the JWEBSOCKET_HOME environment variable and assign it as value the path to the directory "jWebSocket-1.0" where was unzip the jWebSocketJDBCPlugIn package.

If the operating system is Linux, the package that contains the application client must be copied var/www in addition it should be given all permits through the console. The package that contains the server can be stored in any location. Before running the client in the browser, the server must be running on an IDE.

If the operating system is Windows, you must have installed Wamp that creates the folder C:\wamp\www. In this folder you must copy the packet that containing the client. The package that contains the server can be stored in any location. Before running the client in the browser, the server must be running on an IDE.

Wamp must be configured if the user prefers to access the application from an external workstation. For this the user must to change the attribute Listen of the httpd.conf configuration file as follows: Change this to listen on specific IP addresses as shown below to prevent Apache from glomming onto all bound IP addresses (0.0.0.0).

Listen: Allows you to bind Apache to specific IP addresses and/or ports, instead of the default.

Hardware

Developers may use machines with powerful Dual-Core processors or higher and 2 or more GB of RAM.

Depending or the applications particular process requirements and target multi-user concurrency, production servers may use strong Quad-Core processors and 8 GB or more of RAM dedicated to the JVM process running the jWebSocket server.

Settings

For the application execution, the user needs to include the following configuration of JDBC plug-in in the plug-in section in the jWebSocket.xml.

<plugin>
	<name>org.jwebsocket.plugins.jdbc.JDBCPlugIn</name>
	<id>jws.jdbc</id>
	<ns>org.jwebsocket.plugins.jdbc</ns>
	<jar>jWebSocketJDBCPlugIn-1.0.jar</jar>
	<server-assignments>
		<server-assignment>ts0</server-assignments>
	</server-assignments>
	<settings>
		<setting key="spring_config">${JWEBSOCKET_HOME}conf/JDBCPlugIn/jdbc.xml</setting>
	</settings>
</plugin>

The file jdbc.xml contains a map with the native access and your data sources for each data base connection.

How does it work?

  1. Execute the Web server to publish the server-side application Web client. Copy your Web client files in a public Web server directory.
  2. Execute the jWebSocket server by using the following command line:
  3. Open your Web client with a WebSocket compliant browser. Older Browsers are supported by the Flash- or Comet-Fallback. Start using your JDBC Web application from your Web client.

Support

The JDBC plug-in is part of the official jWebSocket release, has been developed by Alexander Schulze leader of international community jWebSocket and Rolando Betancourt member of the jWebSocket development team.

Contact with us at:

Publications

Learn more about WebSockets in general, get background information and gain deeper insight!

Join jWebSocket

Wether developer, designer or translator – join the jWebSocket team and grow together with our success!

Copyright © 2013 Innotrade GmbH. All rights reserved.