Gayathri Chowduru

Ranch Hand
+ Follow
since Oct 17, 2007
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 Gayathri Chowduru

I've three threads. T1 is main thread and T2 is the child thread. I've to perform a task on Thread T2 in both Synchronous as well as Asynchronous manner by using an explicit call from Thread T1. For Async call, I'm using my code as below.

Context ctx = null;
ctx = new InitialContext();
WorkManager wm = (WorkManager)ctx.lookup(RatesConstant.WORK_MANAGER_JNDI_NAME);
WorkManager slaveWM = (WorkManager)ctx.lookup(RatesConstant.WORK_MANAGER_SLAVE_JNDI_NAME);
AValhallaAsyncMgr asyncMgr = new AsyncRatesBookingRequestHandler(slaveWM, req.getRequestContextBean());
wm.startWork(asyncMgr); //Async Validation

The above code snippet is working good. But for Synchronous call, I need to initiate the child thread T2 from main thread T1 and I should execute it asynchronusly without affecting T1 performance and join the response to parent thread T1. Currently I'm using the code snippet as like below.

Context ctx = null;
ctx = new InitialContext();
WorkManager wm = (WorkManager)ctx.lookup(RatesConstant.WORK_MANAGER_JNDI_NAME);
WorkManager slaveWM = (WorkManager)ctx.lookup(RatesConstant.WORK_MANAGER_SLAVE_JNDI_NAME);
AValhallaAsyncMgr asyncMgr = new AsyncRatesBookingRequestHandler(slaveWM, req.getRequestContextBean(),req,respBo,logOrFail,new RatesWorkStatusHandler());
wm.doWork(asyncMgr); //Sync Validation

The problem here is, when doWork() is being called, T1 is continuing with its execution, without being waited for T2 to finish of its execution. I can allow only 200ms for T2 to execute, means I can allow T1 to wait for only 200ms. If T2 exceeds this time, T1 is not getting the update from T2. How can I achieve this???

Thanks,
Gayathri
13 years ago
The scenario is like,

For a transaction, more than 100 update statements gets executed. Our situation is like after executing around 50 or 60 update statements, few of the update statements are getting rolled back. But still the remaining update statements are successful only.
We follow the asynchronous framework and for each UPDATE STATEMENT, we create a separate thread for the execution. Are these rollbacks are because of not setting the conn.setAutoCommit(true) ??

That too why is it causing few Update Statements to rollback?? Not for all?? But still after these rollbacks, the rest of the update statements are successful only..

Thanks,
Gayathri
[color=blue]Can someone please let me know, is there a chance for the transactions that gets hung up if I set the conn.setAutoCommit(false)???
Could you please let me know the importance of conn.setAutoCommit(true)??

Thanks,
Gayathri
Hi Experts,

I'm facing a problem with RSA. When I tried to execute a .java class from one of the package of my current project, I receive an error as "Exception Occured Executing Command Line". If I run the .java file from another package, it is working good. Can anybody please let me know what caused this error and how to resolve it.

Thanks in Advance.

Thanks,
Gayathri
Archana,

Try this, open your jsp page,

<jsp:useBean id="yourFormBeanId" class="yourClassType" scope="request"/>

<%
// set the MIME type to MS-Excel
response.setContentType("application/vnd.ms-excel");
%>

and then do your stuff. Since you set its response to this excel, all your database records will be displayed in excel only.

Let me know if you still have questions.

Thanks,
Gayathri
15 years ago
JSP
Hi Yash,

Try this out,

import java.io.UnsupportedEncodingException;
public class MyTest{
public static void main(String[] args) {
String sEbcdic = "indiasafd87sadf987987asdf";
try {
String convEbcdic = new String(sEbcdic.getBytes(),"Cp037");
System.out.println("EBCDIC : " + convEbcdic);
}
catch (java.io.UnsupportedEncodingException use)
{
System.out.println("e = " + use);
}
}
}

Thanks,
Gayathri
15 years ago
Hi Ranchers,

Can anybody please tell me why I am getting the below error message while I am trying to debug the java code in RSA.

JVMJ9TI002E Agent_OnLoad not found in library jdwp
JVMJ9VM015W Initialization error for library j9jvmti23(-3): JVMJ9VM009E J9VMDllMain failed
Could not create the Java virtual machine.

Thanks,
Gayathri.
15 years ago
Hi everyone,

while uploading the ear file in to the websphere server, I am getting a message like

ADMA0102E: is not defined in the ra.xml file.

Please tell me why I am getting this message.

Thanks,
Gayathri.
15 years ago
Hi Everyone,

I am very new to this EJB. I have developed a simple EJB application and deployed it into the WebSphere app server. It has shown the message like "Successfully deployed". I am using the MyEclipse Blue. After starting the server, in the logs I am getting a message like

"naming exception caused the creation of the home obj to fail"

Can anybody please tell me what is the problem and why I am getting this message?

Thaks,
Gayathri
Hi Everyone,

Can anybody please tell me what is the difference between AWT and Swings..

Thanks,
Gayathri Chowduru.
15 years ago
Hi Angeles,

Actually you posted was,
************************************************************************
When I run index.html, it cannot find the url 'example/HelloWorld', and gives 'page not found'.
************************************************************************

Go to Project-->Properties-->Server

Check whether the WebSphere Application Server is there or not. If you have the WebSphere, make sure in the above path, the server is there or not..

If you did't install the WebSphere, you can run this on tomcat.. Install the tomcat and go to the above path and give the directory of tomcat and then try to run..

Thanks,
Gayathri Chowduru.
15 years ago
I understood. I am giving you a simple example..Check it..

myExample.jsp
-------------

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<html:html>
<head>
<script type="text/javascript">
function getTheValue(){
var Index = document.myForm.user.selectedIndex;
var Value = document.myForm.user.options[Index].text;
alert(Value);
}
</script>
</head>
<body>
<form action="" name="myForm">
<html:select name="user" property="user" onchange="getTheValue()">
<html ption value="ibm">IBM</html ption>
<html ption value="lenovo">Lenovo</html ption>
</html:select>
</form>
</body>
</html:html>

run this jsp page and let me know whether this is your requirement or not.. :-)

Thanks,
Gayathri Chowduru.
15 years ago
Hi,

The JSP EL is custom defined and Struts EL (JSTL) is standard tlds.

Thanks,
Gayathri Chowduru.
15 years ago
Hi Gowher Naik, you are true... We can't use struts tags without struts framework..

Jagadish, if you need only the html tags, you can include in your jsp the below declaration.

<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>

This will work for the static presentations only.. If you need the actions for controls, you should use the struts framework.

For my understatnding of your requirement, this is the solution.

Thanks,
Gayathri Chowduru.
15 years ago
Hi Jagadish,

You can do that in two ways. You can use any of the IDE that supports struts framework. Like MyEclipse, NetBeans etc.. Or else,

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>

you can use these declarations in the jsp and to your project libraries, add the struts.jar file.

you can check a simple web application using struts with NetBeans IDE from below link..

http://www.netbeans.org/kb/50/quickstart-webapps-struts.html

Thanks,
Gayathri Chowduru.
15 years ago