Recent Notes
Displaying keyword search results 1 - 10
Created by Dr. Xi on June 17, 2012 13:14:25
Last update: June 17, 2012 13:14:25
Link to official Java networking properties page: http://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html
http.keepAlive (default: true)
Indicates if keep alive (persistent) connections should be supported. Persistent connections improve performance by allowing the underlying socket connection be reused for multiple http requests.
The default is true and thus persistent connections will be used with http 1.1 servers. Set to 'false' to disable the use of persistent connections.
http.maxConnections (default: 5)
If HTTP keep-alive is enabled, this value is the number of idle connections that will be simultaneously kept alive, per-destination.
Created by Dr. Xi on February 12, 2010 22:39:15
Last update: February 12, 2010 22:39:15
When you start Tomcat for the first time, you may get the "port 8080 is already in use" error. Indeed, port 8080 is commonly used by a lot of development servers by default (Oracle XE for another example). Luckily, it's quite easy to ask Tomcat to use a different port. I use port 8086, which is a natural next step and superior to 8080.
Simply edit $CATALINA_BASE/conf/server.xml and change 8080 to 8086:
<!-- A "Connector" represents an endpoint by w...
If you have not configured Tomcat 6 for multiple instances by setting a CATALINA_BASE directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME , the directory into which you have installed Tomcat 6.
Created by Dr. Xi on November 06, 2008 20:11:19
Last update: March 13, 2009 21:37:36
To run a web app in Oracle Application Server with precompiled JSPs (therefore, not recompiling a JSP when requested), add the following servlet section to web.xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<we...
Or, uncomment the relevant section in $ORACLE_HOME/j2ee/OC4J_INST/config/global-web-application.xml :
<servlet>
<servlet-name>jsp</servlet-...
Created by Dr. Xi on October 15, 2008 19:49:31
Last update: October 15, 2008 19:49:31
Ant script:
<?xml version="1.0"?>
<project name="OC4JDe...
Deployment properties:
# Deployment properties
targetenv=Development
...
Created by Dr. Xi on October 02, 2008 03:15:54
Last update: October 02, 2008 03:31:10
Common JDBC connection URLs
SQL Server
Driver : com.microsoft.jdbc.sqlserver.SQLServerDriver
URL : jdbc:microsoft:sqlserver://<host_name>:<port_number>;DatabaseName=<database_name>
Driver : com.microsoft.sqlserver.jdbc.SQLServerDriver (SQL Server 2005)
URL : jdbc:sqlserver://serverName\instance:port[;user=value][;password=value][;property=value]
Driver : net.sourceforge.jtds.jdbc.Driver
URL : jdbc:jtds:sqlserver://<server>[:<port>][/<database>][;<property>=<value>[;...]]
Oracle
Driver : oracle.jdbc.OracleDriver
URL : jdbc:oracle:thin:@<host_name>:<port_number>:<database_name>
DB2
Driver : COM.ibm.db2.jdbc.net.DB2Driver
URL : jdbc:db2://<host_name>:<port_number>/<database_name>
MySQL
Driver : org.gjt.mm.mysql.Driver
URL : jdbc:mysql://<host_name>:<port_number>/<database_name>
Sybase
Driver : com.sybase.jdbc2.jdbc.SybDriver
URL : jdbc:sybase:Tds:<host_name>:<port_number>/<database_name>
Driver : net.sourceforge.jtds.jdbc.Driver
URL : jdbc:jtds:sybase://<server>[:<port>][/<database>][;<property>=<value>[;...]]
Created by Dr. Xi on September 13, 2008 20:52:47
Last update: September 15, 2008 23:04:35
The text source of the stored objects (including stored procedures) are made available in Oracle by three views: USER_SOURCE describes the text source of the stored objects owned by the current user. This view does not display the OWNER column. ALL_SOURCE describes the text source of the stored objects accessible to the current user. DBA_SOURCE describes the text source of all stored objects in the database. These are the columns: Column Name Description OWNER Owner of the object NAME Name of the object TYPE Type of object: FUNCTION, JAVA SOURCE, PACKAGE, PACKAGE BODY, PROCEDURE, TRIGGER, TYPE, TYPE BODY LINE Line number of this line of source TEXT Text source of the stored object If you want to search for a certain keyword in the source,...
Created by Dr. Xi on May 14, 2008 22:55:22
Last update: May 14, 2008 23:07:49
This procedure works for Oracle application server 10.1.3.1, SOA suite. But should be applicable for standalone OC4J or JDeveloper installations with minor modifications. $ORACLE_HOME is the home directory for Oracle app server. $JDEV_HOME is the home directory for JDeveloper.
1. Change directory to $ORACLE_HOME/j2ee , mkdir lib
2. Copy xmlparserv2.jar from $JDEV_HOME to $ORACLE_HOME/j2ee/lib .
3. Copy ocj.jar and jdev_remote.jar from $JDEV_HOME/jdev/lib to $ORACLE_HOME/j2ee/home/lib .
4. Edit global-web-application.xml under your OC4J instance's config directory. Change the development attribute to true .
<orion-web-app
xmlns:xsi="http://www.w3.org/...
5. Add the following to the servlet section of global-web-application.xml :
<servlet>
<servlet-name>jsp</servlet-na...
6. Edit $ORACLE_HOME/opmn/conf/opmn.xml , add -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 to start-parameters/java-options :
<process-type id="MYOC4J" module-id="OC4J" status=...
7. In Eclipse, open to port 4000 for remote debugging.
Created by Dr. Xi on April 07, 2008 22:18:29
Last update: April 07, 2008 22:19:30
Oracle's documentation on how to set up Ant tasks for web services is ambiguous and tedious. Here's a simple Ant file to accomplish that task.
<project name="TEST" basedir="." default="usage" x...
Created by Dr. Xi on August 16, 2007 18:47:40
Last update: August 16, 2007 18:52:02
If you use quartz or the plain old java.util.Timer class to schedule jobs in an OC4J container, you need to enable the -userThreads switch with the OC4J container. This is the relevant section in $ORACLE_HOME/opmn/conf/opmn.xml :
<process-type id="INST1" module-id="OC4J" status="...
Or, you can add it through the Oracle em console. Go to the OC4J container, click "Administration" tab, then "Server Properties". Add "-userThreads" to "Start-parameters: OC4J Options".
Debu Panda has written a good article on using quartz in the Oracle environment: Using Quartz Enterprise Scheduler in J2EE
Created by Dr. Xi on May 08, 2007 23:09:39
Last update: May 08, 2007 23:13:07
First create a resource provider for Oracle AQ in orion-application.xml:
<?xml version = '1.0' encoding = 'windows-1252...
Then, hook up the EJB to the queue in orion-ejb-jar.xml:
<?xml version = '1.0' encoding = 'windows-1252...
Make sure the resource names ('rsname') match among the xml files.
Full information is available from the Oracle document titled "Oracle Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.1.0)". Look at Appendix A.