Dave Coombes

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

Recent posts by Dave Coombes

Hi,

I have a question regarding datasources and connection pooling in WebSphere v4.0.7. We have multiple instances of the same application each deployed on its own application server instance under the same admin server. We have created a datasources for Oracle and specified a minimum and maximum connection pool size. My questions are

1) Is the connection pool shared across all application server instances or is a pool created for each app server instance. The reason I ask is that in the Resource Analyzer, there is a set of counters for each defined datasource, scoped by the application server instance, each with different values in. I am not sure what conclusion to draw from this. Does this imply a pool per application server instance or a shared pool and the counters are just reflecting the fraction of the pool being used by the particular app servers?

2) Is there any way to purge or refresh the connections in the pool? We have had a problem with some Oracle connections becoming 'dead' as far as Oracle is concerned but WebSphere has not detected this (i.e. no database errors have been mapped to StaleConnectionException) and then the number of effective connections in the pool becomes reduced. It would be useful if there was some to signal to WAS that it should refresh its connections without restarting the app server instance in this case.

Any help on either of these would be gratefully received.

Cheers
Dave
19 years ago
Hi,

I have a question regarding the configurability of the allocation of servlet container resources within WebSphere 4.0.7. Specifically we have an application which provides web services for online purchasing and online reservations. Online purchasing is the core activity and as such we would like to give it priority over online reservations. Is it possible (for instance) to allocate a certain proportion of the servlet container threads to service a set of URLs and another proportion for another set. Alternativley, as we are using the IBM HTTP Server in front of WebSphere, does this (or Apache) offer any finer grained control over preferentially allocating resources to a set of URLs over another? Is this the sort of configuration that is better doen at the web server level?

Another option we have considered is to deploy two instances of the application, each into its own application server instance so that we can can configure the resources of each servlet container individually, but we would then have to manage them both.

This is probably a problem with a very easy and obvious answer, but I couldn't find anything specifically about this anywhere, so any help would be much appreciated.

Thanks
Dave
19 years ago
For what its worth, we are currently using XDoclet in a project deploying in to Websphere and JBoss. It works very well, dramatically reducing the number of atrificats we have to keep under CVS. However, we did need to make some extensions to generate certain elements of the IBM specific deployment descriptors.
Cheers
Dave
20 years ago
One option is to use XDoclet tags in your source code which you keep in CVS and then generate the deployment descriptors as part of the build process using Ant.
From what I remember of using Visibroker and the VBJ script, it sets up some system properties used by the InitialContext factory which probably reference Visibroker/Borland specific factory classes/urls.
See if it is setting the java.naming.provider.url property as it looks like this is what your app is falling over on.
Hope this is of some help
Dave
Hi,
I have a question regarding exception handling within container
managed transactions in WAS 4.0 AE. In our application we have a number of places
where we catch checked exceptions (such as SQLException) and rethrow
them wrapped in EJBExceptions in a text book manner. We have a set off
checked exception classes which allow a few nice bits of functionality
such as maintaining stack traces across RMI boundaries and logging
which we find useful in debugging and passing error messages back to
clients.
However, we now have a requirement to run our application within a
transactional context. What we have found is if we throw an unchecked
exception (such as an EJBException) from an EJB method within a
container initiated transaction then the client of that method
receives a javax.ejb.TransactionRolledBackException as we would
expect. However, rather than wrapping the exception which was thrown
from the EJB, it wraps an instance of
org.omg.CORBA.TRANSACTION_ROLLEDBACK and any error messages or stack
trace from the actual exception thrown is lost.
I have read in a thread on an IBM news group that the reason for this is
compliance with the RMI-IIOP spec. My questions are:
1) Is there any way to have context information (error messages,
statck trace) included in this presumably container generated Corba
exception?
2) What are the advantages of using unchecked exceptions to signal to
the contaniner to roll back a transaction rather than a bean
explicitly call setRollBackOnly and then throw a checked exception?
Any help or advice in this area would be much appreciated
Cheers
Dave Coombes
dave.coombes@lfs.co.uk
21 years ago
J,
On our project we also moved from JBoss to Websphere and found the increased compile/deploy time frustrating. One short cut though (you may already know this) is that the ejbdeploy step is only strictly necessary if the remote interfaces to your EJBs have changed. If you just changed the impementation classes you can just update the jar with the new versions. We find this cuts down the compile/deploy cycle considerably.
Hope this helps
Dave
Depending on which app server you are using, some (certainly Websphere does) let you indicate whether bean methods are read only and the container can then make optimizations by not calling ejbStore on bean instances which have only had read-only methods called on them.
Alternatively, as you are using BMP, you implement the ejbStore method so you can employ strategies to optimize this such as the Dirty Marker pattern described in the Core J2EE patterns book.
Hope this helps
For what it's worth, you can use HomeHandles in a modified version of the EJBHomeFactory pattern when you have (for instance) a web container and an EJB container in separate processes or on separate nodes which may be started and stopped separately as the HomeHandle is valid for separate runs of the EJB container whereas the EJBHome reference is not.
Assuming you are using MQSeries as the JMS provider have you got the JMS jars (mq.jar, mqjms.jar, providerutil.jar) on the nodes classpath?
Hi,
On this subject, on the application I am working on, we model customers as entity beans. Customers are either Corporate Customers or Personal Customers which have some properties in common and then some specific properties.
Because the finder methods on an entity bean are non-polymorphic and the specific implentation class is defined in the deployment descriptor, we are in the situation where we have three entity beans defined in the DD, one for each specific type of Customer and one for 'CustomerBase' which we use if you want to find a customer irrespective of its type.
This does not seem ideal and it would be nice if you we had one Customer EJB whose home interface returned specific types which the client could then downcast if they wanted to call specific methjods on the sub-class.
Am I missing something?
Thanks
Dave
Hi,
Does anyone know if it is possible to use the Oracle XA datasource with BMP entity beans. I've read a couple of things in newsgroups which suggest not, but can anyone offer a definitive answer?
Thanks
Dave Coombes
21 years ago
Are you sure your client code is correct. You test that the Enumeration is not null, but it could still be empty. You should use something like
while(e.hasMoreElements()) {
account = (Account)e.nextElement();
}
to iterate over the enumeration.
Cheers
Dave
21 years ago
Thanks for the reply Simon.
Our customer is asking that we use the XA datasource as they are using MQ Series to deliver messages to a message driven bean and they want the delivery of a message and its processing to be in the same transaction.
Can you explain what you mean by "WebSphere EE can support Oracle as XA datasource(bypassing Java)." Can you point me in the direction of any documentation regarding this?
Thanks in advance
Dave Coombes
21 years ago
Hi,
I am having some problems using the Oracle XA JDBC driver (oracle.jdbc.xa.client.OracleXADataSource) with Websphere and would be grateful if anyone can shed any light on it.
In an attempt to isolate our problem, I have written a stateless session bean with bean managed transactions which has two methods. One method performs a simple JDBC query. The other performs the same query but with calls to UserTransaction.begin() and UserTransaction.commit() around it.
Both methods work fine if I use the 1-phase commit Oracle driver (oracle.jdbc.pool.OracleConnectionPoolDataSource). However, if I use the XA driver the transactional method fails when it tries to perform the query.
Depending on the order I call the methods in I get one of two errors, namely
CONM6016E: Failed to enlist with transaction. Throwing new (TransactionAbortedException).
and
CONM6013E: Connection has outstanding work and can not join a global transaction for data source (mizar_XA).
Our full application needs to be able to call both BMP and CMP entity beans from the session layer but I feel that if I can't get this simple example to work (or understand why it doesn't at least) then the more complex scenario is unlikely to work either.
Any help in this area would be much appreciated.
Cheers
Dave Coombes
21 years ago