jonathan Greens

Ranch Hand
+ Follow
since Apr 07, 2004
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 jonathan Greens

what if you just have one server?
15 years ago
the following code outputs 2.0 instead of 2000.0, why?
thanks
15 years ago
suppose your webserver can handle 2000 requests per sec, now there are 4000 requests per sec, what can you do to handle them?
15 years ago
Rob, nevermind, your code works fine. The key is to make the progress dialog modal, otherwise when I close the window, the dialog gets closed rightaway too.
15 years ago
thank you both for the help.
Craig, I tried your code and it works fine except that the when user clicks to close the window, the window closes. and then the progress dialog will be displayed for 3 seconds before disappearing. Is there a way to delay the window from closing for 3 seconds as well?

Rob, I tried your SwingWorker code and the progress dialog closes rightaway without waiting for 3 seconds. any idea why?

thanks
15 years ago
I want to accomplish the following: user clicks to close a JFrame, then a JDialog popups up display an indeterminate JProgressBar for 3 seconds, then close the popup, close the JFrame. What's the best practice here? I tried this. But the popup dialog doesn't show the progressbar. I'm guessing that I'm not doing the threading correctly. What's wrong with my code?


thanks!
15 years ago
Right now I am polling the server for status every second. Is it possible to have server send the status message to the client? and then the client can handle this message in its onMessage callback function? In axis2, the result of the function call can be get asynchronously from onMessage callback, but is it possible to explicitly send messages from the server before the final result is sent?
16 years ago
thank you both for the wonderful solutions. I understand the state of session management a bit more now.
Regarding the use of session in axis2, I tried the steps in the article, but it doesn't work. new instances of the application class still gets instantiated for every remote call i invoke from the client.
on client I did _serviceClient.getOptions().setManageSession(true);
on server in services.xml <service name="ReportGenerate" scope="soapsession">

here's the asynchronous method call the client stub:


am I missing something?
thanks
[ September 26, 2007: Message edited by: jonathan Greens ]
16 years ago
Ok I found out the cause, every time I make a webservice call from the client, say reportGenerate.getProgress(), the server creates a new instance of ReportGenerate to handle the request..
how do I solve this issue?
16 years ago
dear folks,
I want to be able to start a process from java client, then periodically checks the status of this process until it's done. But for some reason, when client checks the status code, it never changes... On the server side the status code does change. see code for detail:
My server side code:

client side code:


console logs:
server:
0.1
0.2
.
.
.
1.0

client:
0.0
0.0
0.0
.
.
result received mytest
0.0

what's wrong?
thanks!
16 years ago
I want to use a cachedRowSet for reading only. But I do want to restore its cursor position after reading through it. how can this be done? if I use the cachedRowSet for insertion, then I can call moveToCurrentRow().
thanks
hi, what's a good free cvs program that provides an eclipse3.0+ plugin?
thanks!
Hi,
when I invoke CachedRowSet.acceptChanges() without a Connection as a parameter, it returns the following exception:
ava.sql.SQLException: Unable to get connection
I constructed the CachedRowSet from the ResultSet , the complete code is as follows:
any idea why? the acceptChanges(Connection) does work though.
thanks!!

public CachedRowSet executeQueryWithParams(String s, Object[]params) throws SQLException{
CachedRowSet rowset=null;

PreparedStatement st;
Connection con=getConnection();
try {
st = con.prepareStatement(s);

for(int i=0;i<params.length;i++){
if(params[i]==null){
st.setNull(i+1,java.sql.Types.NULL);
}
else if(params[i] instanceof String){

st.setString(i+1,(String)params[i]);
}
else if(params[i] instanceof Integer){
st.setInt(i+1,((Integer)params[i]).intValue());
}

}
ResultSet rs=st.executeQuery();
rowset=new CachedRowSetImpl();
rowset.populate(rs);

}
finally{
closeConn();
}
return rowset;
}
in sql, suppose i have two tables a and b, is it possible to make the deletion of a row in table a triggers the deletion of a corresponding row in b? same for insertion. is this related to foreign key constraint?
thanks
I am using websphere v6.
18 years ago
JSP