Srinivas Nagesh

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

Recent posts by Srinivas Nagesh

I havent reached that part in the book but I think this is what happens when you execute the program

1. x is initialized to 7 in line 4
2. x is incremented to 8 in line 32
3. x is incremented to 9 in line 10
4. when the switch stmt is executed for the first time, the value of x is 9. which means case 9 would be resolved.

I am not sure why would you say x would have a value of 8 in the first iteration of the loop?
Ankit,

I got your point. I split the action to submit and the action to refresh into 2. That resolved my problem. Thanks for your inputs.

Thanks,
Srinivas
15 years ago
The JSP needs info from the action and also need to submit the form post to the action

This is use case. Hope it helps

1. User logs into the app and reaches test.jsp (http://.../test.jsp)
2. User submits a form post which submits to test.action
3. test action class perform some operation in a background thread
4. A "success" result should return to test.jsp
5. A "error" result should return to test.jsp with a message which I am accessing via struts2 property tag to display on test.jsp
6. The test.jsp refreshes to poll for the result of the operation from teststatusManager

The issue is that when the call returns to the jsp, the url in the browser is http://.../test.action. Due to this when the jsp refreshes to poll for the result of the operation performed from the teststatusManager, it re-submits test.action which is not the intention of the refresh.
15 years ago
Hi,

I am currently working on a small web app and this is the first time i am using struts. Here is what i am trying to achieve

A JSP page on form post, calls a struts action. Once this action completes it task, I need to return to the calling JSP and refresh it repeatedly to poll for the results of this task. Please note that all my action does is to execute a java Executor.

I have this configured by specifying the calling page in the result attribute of the action definition in the struts.xml. The problem is that when the action completes its execution and returns to jsp, the url after the return is http://localhost:8080/mywebapp/dosomething.action. Now since i defined a meta tag for the page to refresh, the action is submitted everytime the page refreshes. I think its not refreshing the jsp, but its refreshing the url.

As a workaround, i have defined the result to a temporary page from which i am redirecting to this caller jsp. I am not liking this hack and would like to understand how should this problem be correctly implemented.

Really appriciate any help on this

Thanks in advance
15 years ago
Yes i did, Here are the Bindings Definitions:

Connection Factory:



Queue:


[ July 05, 2008: Message edited by: Srinivas Nagesh ]
Hi All,

I am doing a POC on Transaction Mgmt with Weblogic & Websphere MQ. I am trying to crack this for a few days now but no luck. The flow is:

Stateless Session Bean (CMT) performs a 2 phase commit:

Lookup JMS ConnectionFactory from JNDI.
Calls POJO to send a message.
Lookup DataSource from JNDI.
Calls POJO to insert row in DB.
Commit/Rollback.

Issue:

Rollback on session context doesnt rollback the JMS message put. The DB transaction is rolled back but the JMS message is sent to the queue.

Code Snippets:

ejb-jar.xml



weblogic-jar.xml



Session Bean --> POJO Helper (Send JMS Message)



Any pointers would be helpful.

Thanks

Srinivas
I happened to solve this.

The problem was that i wasn't setting the delivery mode in the message producer to be Non_Persistent.



Thanks

Srinivas
[ April 08, 2008: Message edited by: Srinivas Nagesh ]
Hi,

I am trying to send a message to a dynamic queue. I am using MQ6 & JMS1.1. The messageproducer creates a temporary dynamic queue and requestMessage.getJMSReplyTo() gives me



My code to send the response is


The above piece of code works when i replace the temporary dynamic queue with a permanent static queue.

With temporary dynamic queue, i get the following error:



Any thoughts on the above problem?

Thanks

Srinivas
Hi,

I have tried out the example in the spring reference documentation on JMS Remoting. I have been able to successfully get it working for a service to return the sum of 2 numbers passed from the client. However i would like to know how do things work internally

When i opened the active mq broker admin tool and observe the message sent across, only one message was sent on the queue configured in the spring xml. Shouldn't there be 2 messages, one for the request and one being the response?

So what is in the single message that was sent across? Request or response? or...?

Any pointers would be helpful.
[ February 25, 2008: Message edited by: Srinivas Nagesh ]


Really sorry for wasting all your time on this. Such a silly mistake.

Thanks a ton.
Here is the events hbm file from the tutorial:

I looked into the config and couldnt find any wrong with it. Here it goes.


[ October 02, 2007: Message edited by: Srinivas Nagesh ]
Hi,

I am very new to Hibernate and following the tutorial in this link to learn hibernate

Hibernate Tutorial

When i run the command



I get the following exception. I am not sure what the issue is about. Please help!

BTW i am using

JDK 6
Hibernate 3.2