emm raha

Ranch Hand
+ Follow
since Mar 18, 2003
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by emm raha

Could you elaborate as to why you wouldn't close the connection? I think relying on the garbage collector would still cause a connection leak. The spec does not mandate JDBC drivers to cleanup in finalize. The recommended cleanup sequence would be:

I know this didn't answer your thread-specific question, but hopefully this will prevent future leakage.
Add Oracle's driver path to your classpath when compiling. If you're compiling from the command line:

javac -cp %CLASSPATH%;c:\temp\classes12.jar YourApp.java
Hi Nelson:

You should use the JDBC/ODBC bridge when multiple connections are not required. Multiple instances of your application can create and close connections using the bridge, but this is far less efficient than using a connection pool.

The third party database drivers (e.g. Oracle, MySQL) adhere to the JDBC spec provided by Sun, which enables them to abide by a single contract across multi-vendor application servers (e.g. JBoss, Websphere). If your J2SE application enabled pooling as per the JDBC spec, it too could use Oracle's thin driver.

If your (web) application is hosted on a application server, you can retreive the datasource using the JNDI initial context (thereby leaving the pooling work up to the app server).

If someone has installed and is using the Websphere Community Edition server

please let me know if its possible to create multiple server instances.

18 years ago
Looks like you're unable to look up the datasource that you created. Once your datasource reference is added to web.xml, look it up using:

(Note prefix to reference name.)
[ August 12, 2005: Message edited by: emm raha ]
18 years ago
Or you can put it in your application's web.xml (as opposed to specifying it in your server configs, which may be shared by multiple applications). More in this thread.
18 years ago
You will need to re-start the application whose classpath and/or jars have been updated. You don't have WAS access in your development environment? You should be given access in order to determine whether your changes work, and then hand off to the qa/production deployment team who will be responsible for it in those environments. If they're adamant about locking down the development access, you could ask them for a JACL script to stop+start your specific application, and the appropriate permissions to execute it.
18 years ago
To enable HTTPS for a port in WAS, use the admin console to navigate to:

Servers --> Application Servers --> [yourserver] --> Web Container --> HTTP transports --> SSL enabled = true

To enable HTTPS for IBM HTTP Server, you'll need to specify your SSL certificate. They have a tool for creating default certificates, try googling for more information on that. However, your client may complain that the certificate is "from an unknown authority".
18 years ago
A couple of comments:

IBM's DB2 driver is v. problematic (slow, unreliable, etc.). Which OS is your DB2 database on? Ours is on AIX, and I wasn't able to find an alternative vendor's driver for our OS/DB2 version combination. But I suggest you research alternatives if you decide to stick with DB2 going forward.

Did your ConnectionPoolForWeb.java work during unit testing, with a single connection?

Have you checked that the database does not limit the incoming connections to a # < 10?
18 years ago
If it is a web project, you can create an environment variable in your web deployment descriptor (web.xml).


You can then look up the variable's value using:

I'm about to begin working on an Ant script that will do conditional builds depending on the deployment target. i.e. Not really a build task, but I want it to update web.xml's <env-entry-value> with an environment (Win/Linux) specific path. If anyone has tips on how to do this, please post here.
[ July 22, 2005: Message edited by: emm raha ]
18 years ago
Creating a DB2 connection enables you to 'sample contents', so the same should apply for Cloudscape. Switch to data perspective, create a new connection, and drill down.
19 years ago
As the original poster must have found out, you can delete those two properties.
19 years ago
If you're using this.getClass(), how are you using a classpath variable? As long as abc.txt is available wherever your class files are, WAS should load it. e.g. If you have {project}\bin\{package>}\*.class, and you also have {project}\bin\abc.txt, your code should work (it does in WSAD).
[ February 22, 2005: Message edited by: emm raha ]
19 years ago
WAS: Admin Console --> Environment --> Manage WebSphere Variables --> New
WSAD: Window --> Preferences --> Java --> Classpath Variables --> New

Once you've created the variable, you can add it to your project (Right Click --> Properties --> Java Build Path --> Add Variable). Not sure if this will help you access your text files thouugh.
19 years ago
We see the same exception for connections to DB2 and Oracle, without a firewall in-between the application server/database. It is intermittent and we�re unable to re-create it, I would be interested to know if the config changes you mentioned were a successful workaround for you.
19 years ago