Joe Urbanek

Greenhorn
+ Follow
since Jan 31, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Joe Urbanek

Thank you for your help your answers confirmed what I was thinking, I just needed a few more opinions, I will look into wait() and notifyAll() methods and into DBCP.
I have a Class which performs JDBC calls on a DB2 Database

The Database connections are pooled via the datasource,
There is a method called getdbconnection() which obtains a pooled connection.

The issue is that the method to obtain a connection and the method to release a connection are synchronized methods on the same object (DBConnectionPool). Therefore, at any given time, only one of those methods can be called.

When the data source connection pool runs out of connections calls to DBConnectionPool.getPooledConnection() block waiting for a connection to be returned. Calls to DBConnectionPool.releasePooledConnections() then have to wait for the calls to DBConnectionPool.getPooledConnection to unblock.

Because the calls to return a connection are waiting for the calls to get a connection no connections will ever be returned and therefore no connections will ever be given causing the dead lock.

Your assistance is appreciated.

Here is example of the code:

Is there an a Struts 2 Tag Library equivalent of the struts-html base tag?
17 years ago
Here is another way.



Your example is not really real world because you dont always know know the size of your array and you would be loading your maps on the values in your array instead of just position.
18 years ago
That worked for me, thank you.
18 years ago
JSP
I have a JSP that includes the following javascript functions to generate a swap list. The Options are 2 collections, hostList and targetHostList which are retrieved from a database on the server and loaded into the request session. The User makes selections and these selecteds are stored in Global Javascript variable selectedOptions. How can I make the javascript variable selectedOptions accessable to the Servlet when it is posted?

Here is the code which I am trying to accomplish this with:
(Java Script Swap List):



Your assistance is greatly appreciated
18 years ago
JSP
Thank you very much for your assistance
19 years ago
Is it possible to to edit and submit a collection of multiple records using struts?

for example I have the following Action Form defined

public class AttributeForm extends ActionForm{
private String name;
private String value;
private boolean stamped;
}

On the server an ArrayList is created and populated with multiple instances
of this AttributeForm object.

This collection of AttributeForm attributes are displayed to a user
in as a list of records.
The name and value attributes and the stamped attribute are all editiable by the user.

<%@ taglib uri="struts-bean.tld" prefix="bean" %>
<%@ taglib uri="struts-html.tld" prefix="html" %>

<html:form action="/attributes/save.do">

<TABLE cellspacing="0" cellpadding="0" border="0">
<TBODY>
<logic:notEmpty name="attributeList">
<logic:iterate id="attribute"
name="attributeList">
<TR>
<TD>Name:</TD>
<TD>
<html:select property="${attribute.name}"
value="${attribute.name}">
<html ption value="A">A</html ption>
<html ption value="B">B</html ption>
</html:select></TD>
<TD>Value:</TD>
<TD>
<html:text property="${attribute.value}" size="16"
value="${attribute.value}"/>
</TD>
</TR>
</logic:iterate>
</logic:notEmpty>
<TR>
<TD colspan="3" align="right">
<html:submit/>
</TD>
</TR>
</TBODY>
</TABLE>
</html:form>

Is it possible to collect all of the modified attributes for each line Item
and submit them as a colection of these ActionForms when the submit button is clicked?
19 years ago
Why dont you just open the document in Word and save it as HTML?
19 years ago
Can you be you be more specific an detail what you are trying to do. If you are trying to filter the textarea text, regular expressions would be the way to go.
I have a java application that needs to validate the format of a String. I am attempting to use Java regular expressions to validate this String. If the String does not follow the pattern then an exception is thrown.

The String needs to follow the following format:

XXXX[@XXXX='XXXXXX']

*note the the XXXXs represent a series of any alpha nnumeric or special characters of unspecified length.

I am not sure if my Regular Expression pattern is correct.

Any assistance is appreciated.

Here is what I am tying to do:

public void isValid(){
String expression = "XXXX[@XXXX='XXXXXX']"; //valid
String expression2 = "XXXX[@XXXX='"; //invalid

Pattern expPattern =
Pattern.compile(".*\\w\u005B@.*\\w='.*\\w'\u005D");

String[] exps = new String[]{ expression, expression2};

for(int i = 0; i < exps.length; i++){
boolean valid = false;
Matcher baseMatcher = expPattern.matcher(expression );
valid = baseMatcher.find();
baseMatcher.reset();
System.out.printline(i + ": " + valid);
}
}
19 years ago
.reload() does not seem to work with Firewox, it must be MicroSoft specific code.
I have an action class that triggers a pop up window displaying the results of the action. What I want to happen is when a user clicks a cancel button in the popup window I want the pop up window to transfer the control to the parent window and then trigger an action class that refreshes the parent window before the pop up closes, then I want the pop up window to close.

Any assistance is appreciated.
[ January 31, 2005: Message edited by: Joe Urbanek ]
I have an action class that triggers a pop up window displaying the results of the action. What I want to happen is when a user clicks a cancel button in the popup window I want the pop up window to transfer the control to the parent window and then trigger an action class that refreshes the parent window before the pop up closes, then I want the pop up window to close.

Any assistance is appreciated.
[ January 31, 2005: Message edited by: Joe Urbanek ]
19 years ago