Sirish Kumar Gongal Reddy

Ranch Hand
+ Follow
since Oct 25, 2004
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 Sirish Kumar Gongal Reddy

Hello there,
I have my dedicated database (SQL Server 2005) for my java web application but I wanted to get/fetch the data from SAP (ERP system) which holds typically an ecommerce data (Sales,price and inventory data) say daily once as a batch process. What will be the best approaches to deal with this task?

The sub task I have identified is,

1) Map the tables of my local database with SAP Tables.(I think this might
be the fist thing I needs to to)
2) After mapping load respective data into respective tables.

Any suggestions will be appreciated much.

Many thanks,
Sirish
Hi there,

Check your antivirus settings. Generally antivirus won't allow to send emails using some other program (log4j). Go to properties of antivirus in your system try and check there you must find one option related to email sending just check or uncheck (if it is checked) it will work fine.

I have implement the same thing but I have used log4j.properties not .xml check this out any way...
http://sirishg.blogspot.com/2008/08/error-reporting-through-e-mail-using.html

-Sirish
[ September 19, 2008: Message edited by: Sirish Kumar Gongal Reddy ]
Hello All,

Just to bring up this topic as I did not hear anything about this.

Any comments on my question?

Many thanks,
Sirish
12 years ago
Hello,

You guys have any update of US IT job market at present. Is that worth to take up H1B (already exist) now?

Thanks,
Sirish
12 years ago
Hello,

I got the solution. Here is the method I wrote and I found some inputs from sun forums. Thanks Again!

public boolean executeDBScripts(String aSQLScriptFilePath, Statement stmt) throws IOException,SQLException {
boolean isScriptExecuted = false;
try {
BufferedReader in = new BufferedReader(new FileReader(aSQLScriptFilePath));
String str;
StringBuffer sb = new StringBuffer();
while ((str = in.readLine()) != null) {
sb.append(str + "\n ");
}
in.close();
stmt.executeUpdate(sb.toString());
isScriptExecuted = true;
} catch (Exception e) {
System.err.println("Failed to Execute" + aSQLScriptFilePath +". The error is"+ e.getMessage());
}
return isScriptExecuted;
}
Hello,

Thanks for replies. Yes my scripts only includes DML operations like drop the tables and load tables with default tables and check all tables are created properly or not like stuff. No procedure or functions.

My .sql scripts do kind of security check for database before deploying my actual application.

Many thanks,
Sirish
Hello,

How can I execute .sql(List of .sql files in a resides in local directory)files using java. What I need to do is,

1) Read .sql files one by one from local directory and execute them in oracle environment using java. If it throughs any execption I need to capture that exception.

Note: My .sql file will includes lot of database scripts each file will take around 15 to 20 min to execute.

Many thanks,
Sirish
Use windows schedular to invoke your process at specified time. For that you need to write one .bat file and configure that with windows schedular (controlpanel-->Scheduled Tasks and add new task).
.bat file is responsible for to invoke a java class at specified time and your java class will take care of rest of the things like as you said generating report and email(use java mail API) it.
12 years ago
Hello,

I need to disable the JSP except few buttons in the bottom, So user should be able to click on those buttons. User should not able able to edit/modify anything on the JSP.
Could you please guide me how to disable whole JSP except few buttons.

Thanks!
Sirish
[ February 06, 2008: Message edited by: Bear Bibeault ]
Hi,

I need to reload/refresh the page after clicking the browser back button. How can I do that? Any idea? On which event should I call window.reload()?

If user wants to come back to prvious page simply he will click on browser back button when he reached to prvious page I need to reload that page and populater the page with updated values.

Any ideas?

Many thanks,
Sirish
Hi Friends,



We have One IBM web sphere app server with 2 processors and 8 GB ram and three instances are running on this server. All the instances are connected to separate DB instances.





Application: whenever the page loads the applet is downloading on the page (which contains half part is jsp and half part is applet as shown in the below screen)

Here my problem is whenever the page loading more than five users applet loading is very slow compare to accessing two or three users.



Note: Whatever the applet I am talking is actuate spread sheet engines (Product from actuate company) we can implement excel like functionalities using this api.



I looked into different parts of code and found some places where it was taking time

1) Whenever the java script is trying to download actuate product jar

2) Creating jbook object on applet class INIT() method.



I would like to explain you my simple architecture of loading applet, at this situation the involved files are jsp, JavaScript, applet class, servlet class



In the Jsp



<html>

<body leftmargin=0 topmargin=0 scroll=no>

<script src="<%=RBCConstants.APP_JSP_PATH%>/javascript/load_BPapplet.js"></script>

</body>

</html>





In the load_BPapplet.js Java Script // This part is taking time



document.write('<OBJECT classid = "clsid:CAFEEFAC-0014-0002-0010-ABCDEFFEDCBA" codebase ="/RockWorld/Download_jre/j2re-1_4_2_10-windows-i586-p.exe" NAME = "FrontEndApplet" WIDTH ="100%" HEIGHT ="70.5%" > ');

document.write('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');

document.write('<PARAM NAME="scriptable" VALUE="false">');

document.write('<PARAM NAME = CODEBASE VALUE ="/RockWorld/AssortPlan">');

document.write('<PARAM NAME = CODE VALUE = "com/imageinfo/common/FrontEndApplet.class" >');

document.write('<PARAM NAME = ARCHIVE VALUE = "f1j11swing.jar" >'); // this jar placed in the same folder where jsp and JavaScript files are placed

document.write('<PARAM NAME = NAME VALUE = "f1" >');

document.write('<PARAM NAME = workbook VALUE = "InlineNewWkOrderDtl"> </OBJECT> ');



In the FrontEndApplet applet class (Attached for reference)

I have added the new method called destroy as below, this method is executing automatically by IE whenever the user leaves the applet, but still the performance looks same as existing.



public void destroy() {

System.out.println("**destroy method:");

if (m_jBook != null){

System.out.println("**destroy method: if executed");

m_jBook.destroy();

}

}



As per current implementation in the INIT () method

Step 1: creating jbook object (which is used in entire class, this object is also used after the applet is loaded for other functionalities like ActionListener,

HyperlinkListener, KeyListener, UpdateListener, MouseListener

Step 2: Add jbook object to required listeners

Step 3: Preparing URL connection to make call to servlet. (Servlet functionalities are mentioned below)

Step 4: Calculating formulas



In the Servlet Class (Attached for reference)



if (szAction.equals("GETEXCEL"))

{

con = RequestDBConnection();

BookModelImpl book = null;

ExcelDataObject ExcelObject = null;

String eviewId;

String escreenName;

String etokenValue;

String esessionId;

String sheetName;

try {

HttpSession session = req.getSession(true);

ExcelObject = (ExcelDataObject) session.getValue("dataEcel");

eviewId = ExcelObject.getViewId();

eowner = ExcelObject.getOwner();

eNumber = ExcelObject.getNumber();

escreenName = ExcelObject.getScreenName();

etokenValue = ExcelObject.getTokenValue();

esessionId = ExcelObject.getSessionId();

sheetName = ExcelObject.getSheetName();

BuildPlanExcel bex = new BuildPlanExcel();

book = bex.buildPlanExcel(con, eviewId, eowner, eNumber,

escreenName, etokenValue, esessionId, sheetName); // This Class is used To set required data on sheet

by executing database queries

hmSTDRvMap = bex.getLocMap();

session.setAttribute("FormMap", hmSTDRvMap);

ServletOutputStream out = res.getOutputStream();

//writes out the book to an excel file

WriteParams wp = new WriteParams();

wp.setFileType(BookModelImpl.eFileCurrentFormat);

book.write(out, wp);

out.close();

} catch (com.f1j.util.F1Exception f1j) {

f1j.printStackTrace();

} catch (java.io.IOException ioe) {

ioe.printStackTrace();

} finally {

book.releaseLock();

book.destroy();

try {

if (con != null) {

ReleaseDBConnection(con);

}

} catch (Exception e) {

}

}

}





Please review and advice, this is a production problem, I really appreciate all your efforts.







Thanks & Regards

Gopi
[ August 02, 2007: Message edited by: Bear Bibeault ]
13 years ago
Hi Friends,

We have One IBM web sphere app server5.0.2 with 2 deployed on processors and 8 GB ram system and three instances are running on this server. All the instances are connected to separate DB instances.


Application: whenever the page loads the applet is downloading on the page (which contains half part is jsp and half part is applet as shown in the below screen)
Here my problem is whenever the page loading more than five users applet loading is very slow compare to accessing two or three users.

Note: Whatever the applet I am talking is actuate spread sheet engines (Product from actuate company) we can implement excel like functionalities using this api.

I looked into different parts of code and found some places where it was taking time
1) Whenever the java script is trying to download actuate product jar
2) Creating jbook object on applet class INIT() method.

I would like to explain you my simple architecture of loading applet, at this situation the involved files are jsp, JavaScript, applet class, servlet class

In the Jsp

<html>
<body leftmargin=0 topmargin=0 scroll=no>
<script src="<%=RBCConstants.APP_JSP_PATH%>/javascript/load_BPapplet.js"></script>
</body>
</html>


In the load_BPapplet.js Java Script // This part is taking time

document.write('<OBJECT classid = "clsid:CAFEEFAC-0014-0002-0010-ABCDEFFEDCBA" codebase ="/RockWorld/Download_jre/j2re-1_4_2_10-windows-i586-p.exe" NAME = "FrontEndApplet" WIDTH ="100%" HEIGHT ="70.5%" > ');
document.write('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');
document.write('<PARAM NAME="scriptable" VALUE="false">');
document.write('<PARAM NAME = CODEBASE VALUE ="/RockWorld/AssortPlan">');
document.write('<PARAM NAME = CODE VALUE = "com/imageinfo/common/FrontEndApplet.class" >');
document.write('<PARAM NAME = ARCHIVE VALUE = "f1j11swing.jar" >'); // this jar placed in the same folder where jsp and JavaScript files are placed
document.write('<PARAM NAME = NAME VALUE = "f1" >');
document.write('<PARAM NAME = workbook VALUE = "InlineNewWkOrderDtl"> </OBJECT> ');

In the FrontEndApplet applet class (Attached for reference)
I have added the new method called destroy as below, this method is executing automatically by IE whenever the user leaves the applet, but still the performance looks same as existing.

public void destroy() {
System.out.println("**destroy method:");
if (m_jBook != null){
System.out.println("**destroy method: if executed");
m_jBook.destroy();
}
}

As per current implementation in the INIT () method
Step 1: creating jbook object (which is used in entire class, this object is also used after the applet is loaded for other functionalities like ActionListener,
HyperlinkListener, KeyListener, UpdateListener, MouseListener
Step 2: Add jbook object to required listeners
Step 3: Preparing URL connection to make call to servlet. (Servlet functionalities are mentioned below)
Step 4: Calculating formulas

In the Servlet Class (Attached for reference)

if (szAction.equals("GETEXCEL"))
{
con = RequestDBConnection();
BookModelImpl book = null;
ExcelDataObject ExcelObject = null;
String eviewId;
String escreenName;
String etokenValue;
String esessionId;
String sheetName;
try {
HttpSession session = req.getSession(true);
ExcelObject = (ExcelDataObject) session.getValue("dataEcel");
eviewId = ExcelObject.getViewId();
eowner = ExcelObject.getOwner();
eNumber = ExcelObject.getNumber();
escreenName = ExcelObject.getScreenName();
etokenValue = ExcelObject.getTokenValue();
esessionId = ExcelObject.getSessionId();
sheetName = ExcelObject.getSheetName();
BuildPlanExcel bex = new BuildPlanExcel();
book = bex.buildPlanExcel(con, eviewId, eowner, eNumber,
escreenName, etokenValue, esessionId, sheetName); // This Class is used To set required data on sheet
by executing database queries
hmSTDRvMap = bex.getLocMap();
session.setAttribute("FormMap", hmSTDRvMap);
ServletOutputStream out = res.getOutputStream();
//writes out the book to an excel file
WriteParams wp = new WriteParams();
wp.setFileType(BookModelImpl.eFileCurrentFormat);
book.write(out, wp);
out.close();
} catch (com.f1j.util.F1Exception f1j) {
f1j.printStackTrace();
} catch (java.io.IOException ioe) {
ioe.printStackTrace();
} finally {
book.releaseLock();
book.destroy();
try {
if (con != null) {
ReleaseDBConnection(con);
}
} catch (Exception e) {
}
}
}


Please review and advice, this is a production problem, I really appreciate all your efforts.



Thanks & Regards
Gopi
[ August 02, 2007: Message edited by: Bear Bibeault ]
13 years ago
Hello,

Could you please tell me how can I find out pop up blocker status(Enabled/Disabled)using javaScript. Any sample code.

Many thanks,
Sirish
Hi,

I need to add two URL's to the trusted sites of over 100 computers scattered in all the offices. Some systemes or in the LAN and some are Not it's better to send .exe to everybody simply they will execute that...

Is there a quick and easy way to add these URL's to trusted sites?

All Computers are on Win2k or XP.

I am looking kind of .exe solution or any other even.

Many thanks,

Sirish
13 years ago
Hi Merrill,

Many thanks for your reply with clear explanation.

May be due to the fact that you're invalidating the session yourself after a certian period of time rather than configuring a timeout value through WebSphere or through the J2EE APIs.



I am invalidating user session after some idleTime. and I am caluculating user idle time my self by taking sessionCreatingTime() and lastAccessedTime(). If user is exceeds his assigned time in the Database simply I am redirecting him to login page by giving an alert.

Why I am using this is the session interval for each user is diffenet I need to maintin session based on user role. some user will have 30 min of sessino and some have 1 hr like that. session interval is not common for entair user.

Can't I invalidating the session yourself after a certian period of time?

Thanks a lot!
Sirish
13 years ago