Help coderanch get a
new server
by contributing to the fundraiser

Heath Lilley

Ranch Hand
+ Follow
since Jan 09, 2001
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 Heath Lilley

I have a signed applet that I need to allow users to paste images into. I understand the Clipboard, Transferable, DataFlavor concepts and have been able to get something working.

I can past any image that I copy from within Internet Explorer, however, when I try to copy it from the desktop (Windows Explorer) the imageFlavor isn't supported.

OS = Windows 7
JRE is RAD JVM 1.5 (set for 1.4 compatibility)

When copied from the OS and pasted, this is the only supported DataFlavor...

When copied from within IE (right click, copy) and pasted I get these DataFlavors...

Is there a way to add x-java-image to the list of supported flavors to the clipboard? Preferably within my applet.

Thanks in advance.
14 years ago

Balu Sadhasivam wrote:
Hi ,

I m relatively new to web-services. I hv gone through some articles and time to start. But before i proceed , i just like know if its possible to send a Page (say HTML webpage ) in the soap response. As HTML is parsable content , which data type to be used. Also i heard of SAAJ , does it suffice above requirement ? Or is it possible to accomodate in SOAP message itself. Any help would be appreciated. thanks.

I would think you could just send the HTML as a string attribute of the SOAP message. I always think of the Attachment API for dealing with Binary data.
15 years ago
Java application servers such as WebSphere have components designed to handle multiple requests and the caching of database connections. RDBMS like Oracle have components designed for optimized data access and data caching. These things can be used together to provide a way for you to access the database as you need to while minimizing the overhead of such operations.

These components are some of the reasons why the software costs so much. For the most part they follow industry standards so that when I write code to utilize them my code can be moved from product/environment to product/environment (in theory anyway). But if I write my own components to do the same thing then I would break those standards thus writing a custom architecture that only I know.

These components are provided so that I can focus on business logic which is what I get payed to do.

So unless you are just looking for a programming diversion it is a really bad idea to try and recreate these things yourself.

We are currently moving from a stand-alone Websphere 5.1.2 environment to a clustered WebSphere Application Server 6.1 ND environment. Our cluster will be made up of 2 servers. We have several applications that make extensive use of custom -properties files. These files live in the WEB-INF/classes directory of each specific application and are used to hold our web application specific configuration data (i.e. datasource parameters, jndi names, etc). These environment variables include paths to some XSLTs and images located within the web applications' file structure.

My issue is that where I thought a simple relative path would allow the paths in the .properties to start from the web applications' document root, instead, start from the /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps directory. This is a problem in that to reach the actual web application install root, you have to specify the proper CELL_NAME. The way I understand it is that there will be two cell names (one per server in the cluster) and depending on where the code is running will dictate which path is needed.

I am looking for some documentation that suggests a way to have the .properties path dynamically defined, either at deployment time, or at runtime. Or to configure where the relative path start directory is defined. I have tried to figure out a way to access the WebSphere Environment variables from within the .properties file, but I can't seem to find anything useful. Has anyone had any experience with this?

Any help is greatly appreciated, thanks in advance.

16 years ago
Hello all,
We are currently in the process of porting a legacy web application from a custom Java architecture to Struts/POJOs. We don't use any EJB's or webservices just Struts actions/forms, a basic DAO structure, and jsps. The old application, which was designed to run on WebSphere 3.5 has at the core of the app, a process that spawn n number of threads to select multiple from multiple transactional tables inside of a single Oracle database connection/session.

The issue is that now that we have moved to 5.1 I have been reading about how it is not good practice to use user created threads in WebSphere and am now not sure what to do. Currently, we get around a 50% processing time reduction for using the user threads. I have read about approaches using URL calls to have Websphere start the threads and about possibly using stored procedures to do the work minimizing the app server to database overhead. I was just curious if anyone has had any experience with this and/or might have an alternative approach or something.

18 years ago
Thank you for your response.

I understand that you should only multithread web applications under extreme situations. We have 2 apps that are multithreaded. Both were done this way to get significant gains in performance by doing database access in parallel. By doing this in one of the apps we were able to reduce a report's load time from 20+ seconds to < 10. Performance is really the only time we ever multithread applications and most of the time the functionality we have to provide is not so complex that it takes that long to execute. These are exceptions to the norm.

We do use the application server's connection pooling functionality, sorry for not being clear, I was referring to setting up the connection in the application server thread and setting it into a runnable object for use rather than allowing the runnable object set up it's own connection. Both situations would use the connection pool to obtain a connection.
Hello all,

As part of porting our applications to a new version of Websphere ( I read the 1.3 J2EE specification. It described how you are not supposed to create your own threads from within the EJB container. We don't really use EJBs at all since our apps are relativley small and self contained, so we usually are limited to writing code in the web container using Struts and DAOs. I tried to find some information in the Spec. for this topic but I am having problems finding a hard answer. (I could just be missing something.)

So my questions are...
Is creating our own threads in the web container a bad thing?

If not, is creating a database connection in the calling thread and setting it into the runnable object for use a valid way to do this?

Thanks in advance.
sensitive ponytail guy
19 years ago
In version 5 WebSphere "prefers" you to create a Resource Reference in the web.xml file. This can be done in WSAD under the resource sub tab of the Deployment Descriptor (aka web.xml).

The reference is an alias for the actual JNDI name and can only be accessed via a specific context path. So if your datasource name is "mydb" as defined in the server config and you create the alias for it in the web.xml "mydbalias", then you would have to use the name "java:comp/env/mydbalias".

Hope this helped.
19 years ago
I forgot to mention that our applications do not use EJB's. We were seeing this warning from the Web Container.

I saw that user threads in EJB's are unsupported.

Official word from IBM WebSphere support is that if this warning is coming from the web container, then it can be ignored.

Setting the "logMissingTranContext" to false in the file, we were able to eliminate this message from the logs entirely.
[ March 04, 2005: Message edited by: Heath Lilley ]
19 years ago
Hello all,

Recently I began the process to port all of our applications to WAS from WAS 4.0.7. Uncovering the "new"/proper way to obtain/use/manage datasource connections, I have learned about the Resource Reference, how to use the Connection Alias, and the additional properties that are involved.

I have been able to successfully (for the most part) migrate data access for the first application to WAS 5. I am using the resource reference as well as j2c authentication. This works for 90% of the code.

My problem is that there are several components that are multi-threaded and that are having some issues. I have read that creating datasource connections in user created threads is the wrong way to do things according to IBM's current interpretation of the J2EE spec.

In the effort to identify possible short and long term options I was wondering if any of you could answer the following questions.

First a technical question...
The way I understand the issue, WebSphere doesn't like connections being created in any threads other than the ones it creates. Is this correct? As a possible alternative to getting connections from within my custom threads, could I simply get the connection in the calling thread and set the connection into my Threaded class to be used?

General migration questions...
How supported is the functionality that allows a WAS 4.0.7 based application to run on WAS If we have issues with the application, is IBM going to say "First, you need to migrate the application to WAS 5.x..."? Or do they provide some level of support to resolve problems with this configuration?

How problematic is it to have the various connection/datasource/jndi lookup warning messages to show up in the server log? Other than the need to manage the log file size are their any runtime problems that occur when these are being logged?

I appreciate any information you can provide.
19 years ago
Thanks for the info and the speedy reply, Julia. I have added this to our list of options.
19 years ago
Hello all,

Recently my company has discovered a need for a web based spell checker. Several of us have done some research and found a few products that fit the bill.

Jazzy (Java based, open source spell checker.)
Aspell (C++ based, open source spell checker.)
WBOSS (Pearl based, open source spell checker.)
Jspell (Java based, commercial spell checker.)
IESpell (Active X, Internet Explorer plugin spell checker.)

Since we are almost completely a Java development shop the only 2 options that seem viable are Jazzy and/or Jspell. IESpell seems to have merit but I need to make sure the distribution is as hassle free as it seems from their site.

I was curious if anyone could shed some light on these products and/or list any alternate packages.

Thanks in advance.
19 years ago
Hello all,

We have recently released an application that uses:
Xerces 2.5.1
Xalan 2.5.0
FOP 0.20.5

Our Application Server environment is:
WebSphere 4.0.x running on RedHat Linux v7.x

Our users have uncovered some issues with the widow-orphan and header/footer issues. Due to the open source implementation´┐Żs lack of compliance I realize that we may have to use a different FOP engine.

I have been doing some research and found a list of alternate FOP implementations that may or may not solve these formatting issues´┐Ż

XEP from RenderX
Pure from Advent3B2
XSL Formatter AntennaHouse

While I am looking into the keep-with-[next/previous] properties as well as a few work around examples for the open source implementation of xalan/fop I was curious if any of you have used these, or any other, processors to resolve similar issues.

Thanks in advance.
It all came down to this line...

I was trying to use the SreamSource constructor that used a String uri. For
some reason it was failing with the second ,larger, XLST document.
Thanks for your help.