- Create oracle connection pool.
Copy \oraclestorage\WEB-INF\lib\ojdbc6.jar to <GLASSFISH_HOME>/domains/domain1/lib/ext folder. Note that "domain1" is a default Glassfish domain. The domain may be different for specific deployments.
Restart GlassFish.
Open administrative console of the Glassfish server.
From the main tree (Common Tasks) expand Resources and go to JDBC > Connection Pools. Create a Connection pool:
- JNDI name = Oracle
- resource_type = javax.sql.ConnectionPoolDataSource
- Database Vendor = Oracle
Click Next.
Specify following additional properties (replace following values with your specific):
- url = jdbc:oracle:thin:@localhost:1521:XE
- user = system
- password = password
- xa-driver-does-not-support-non-tx-operations = true
Test connection with Ping button.
- Create DataSource.
From the main tree (Common Tasks) expand Resources and go to JDBC > JDBC Resources.
Press New and provide the following information:
- JNDI Name: jdbc/Oracle (must be called exactly like this).
- Pool Name: The pool name created in the previous section.
Press OK, jdbc-resource will be created.
- Deploy oraclestorage application.
From the main tree (Common Tasks) goto Applications.
Press Deploy and specify following properties:
- Local Packaged File or Directory That Is Accessible from the Enterprise Server = <path to oraclestorage directory>
- Type = Web Application
- Context Root = /
Note: sample can be deployed to non root context but some clients work only with servers deployed to root context.
- Application Name = oraclestorage
- Launch sample.
From the main tree (Common Tasks) goto Applications.
Press Launch on oraclestorage application.
If everything was set up propertly you should see sample page with list of sample files and folders. Now connect to server with any WebDAV client.
If anything goes wrong please consult log usually located at <GLASSFISH_INSTANCE_ROOT>/logs/server.log.