Arnav Velimala

Ranch Hand
+ Follow
since Jun 04, 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 Arnav Velimala

We are developing a Event Notification Service. The application at a high level looks like below:



Our developene scope involves widget and the ENS.

"ENS" acts as a central point of collection for certain types of events that are of interest to users. Any user who wants to know when these types of events occur registers with ENS, which identifies events in order and matches notifications with subscriptions.

The user who wants to subscibe should be a valid user of the intergrated application(db, sap system etc)

The sequence of events:



ENS are the web-services.

ENS polls the SAP(and other applications) and this is where the problem is becoming more complex. In SAP there is data-level authorization. So not all users are allowed to see all the events/data.

If the SAP has PUSHed the data, along with the User info who has authorized to see, then no issues at all.

Case 1: Scheduler is initiated by the ENS

1. User subscribes to a subscription. At the time of subscription, user is checked for his authorization in the SAP system. If OK, then he will be allowed for Subscription.
2. The scheduler runs at the scheduled time.
3. The scheduler identifies the users who are subscribed.
4. The scheduler uses the stored credentials of the users(stroed in ENS) to POLL if the event occured.
5. Notify users if there are changes.

Disadvs here:

* User credentials are stored somewhere external - Security team might not accept it
* Reduntant hits if more than one user is subscribed for the same piece of information

Case 2: Scheduler is intitated by the WIDGET. User creds will be stored in the users local machine only. Diadv:

* If the subscription is daily, and if the user system/widget is not up. The user might miss the notifications that happened on say, weekends.
* Reduntant hits to the server if more than one user is subscribed for the same piece of information.

my question/doubts:

What is the best pracitces in storing the Users db, sap etc credentials.

How often should the user be authenticated? Should be everytime the messages are delivered?(if I use this strategy, it will affect the source system)


13 years ago
Well Said !!

Thank you for the clarifications

Lemme try on Tomcat 6 and JDK 1.6.

Will soon share my experiences.

thanks.

13 years ago


We are planning to upgrade our Tomcat from 4.1.31.

Our's is an Axis 1.4 application where we have our web services.

Request you to suggest the latest stable version of Tomcat 5 or Tomcat 6 suitable for our application. And the things to consider while upgrading.

Will the existing 1.4 Java code base works smoothly on Tomcat 5 or 6?

And going further we may write the code in JDK 1.5 as well. So, having Java 1.4 code and Java 1.5 code together, will create any problems?

Kindly suggest.

Please share your upgradation experiences.

Thank You
13 years ago
We are facing this error intermittently. If we restart the server it works for some time and again the problem start.

We also have another load balanced server with similar configuration and that is working fine.

The server is running on Linux box. If we do the "ps -ef" its listing the TOMCAT process.

URL :

Following the configuration in server.xml file:



* Is it the problem with our load balancer which is forwarding most requests to this server?
* Is it any way related to the "maxProcessors" or "acceptCount" attributes defined in the above configuration?
* Is it the problem with the port number??
* Does it have to do any thing with the certificate. The certificate is generated using Java Keytool. ( However, the other load balanced server is also using the same certificate and working fine)

Please suggest in resolving this issue. thank you
13 years ago
I've an application which am trying to deploy in Window's Tomcat 5.5 - as an Axis Webservice.
The application uses few DLL files, which I've placed the in the dir - $TOMCAT_HOME\common\endorsed\ and specified the same in the java.library.path.

But the DLL files are not recognized by the Tomcat. Following Exception is thrown:



I also tried by putting the DLLs in a jar files..but no use.

Following is the batch file I created to start a Tomcat.



I've created a separate batch file because, tomcat 5.5 does not have any batch files where I can set the above env variables or lib path.

Where should be the DLL placed in Tomcat ??
14 years ago
Am trying to do update a clob column using a connection object that is retrieved using Apache DBCP connection pooling.

Earlier, I've implemented connection pooling using this and it was working fine i.e am able to update CLOB. I switched to DBCP because I was getting java.sql.SQLException: ORA-01000: maximum open cursors exceeded. I've checked connection, resultSet, preparedStatement objects in all the DAOs. All the finally blocks have these cursors closed. Still am facing this error and so decided to switch to DBCP.

But, when I try to update CLOB, with this DBCP connection, the application just hangs at pstmt.executeUpdate().



where getCLOB() method is:


I've tried by passing the ((DelegatingConnection) conn).getInnermostDelegate() connection, but no use.

Also, the same is happening when I try to 'SELECT the CLOB column FOR UPDATE'.

Am using Oracle 9i and the JDBC Oracle Driver version is above 10.

Thanks
Hi,

Am trying to sort a Map based on a value object's attribute.
The Map has supplierId(String) as Keys and Supplier object as value. The Map has to be sorted on the Supplier object's name.

But the following code doesn't work!!






Can anyone tell me what's wrong in my code?

Thanks,
Arnav
14 years ago
Hi,

Am trying to retrieve the following data from the database.


The table has "SupplierID, SupplierName, SiteId, SiteName" information.
For a given supplierID, there can be more than one siteID's.
The Query is
"SELECT DISTINCT supplier_id, supplier_name, site_division_id, site_division_name FROM spend ORDER BY supplier_id"
And there are some 5000 records.




Can any one suggest me the best way to populate these values in my DTO's?

Is it fine if I use a Map to store these retrieved values -
Map with Key having the supplierDTO(which has id & name attributes) and values being a *List* of SiteDTO(with id & name attributes)'s.
As one supplier can have more than one site, I'll be searching for the supplier in the Map before inserting.

Please suggest.

thanks,
Arnav
14 years ago

So is this database read-only as far as users of your application are concerned?



Yes Paul.

Carlos, Thank you very much for your reply. I was not aware that one can manually pool dataSource.
BTW, welcome to JavaRanch.
Keep Replying/Posting.

thanks
Arnav
Hi,

Thank you for the help

Yeah, agree that 5 Connections can serve plenty of Users. And its the *concurrent* users that matter.

This application will be hosted as an intranet site in our organization and will be having users across the globe.
Assuming that there will be more than 5 concurrent users, how should I tackle?

Also the data in the database will be changed on *monthly* basis. The total number of records in the table as of now is 6980 and it can grow maximum 10K.

Is it a better idea to cache all the records... storing in memory or flat file on the machine(where the program runs).

Please suggest.

thanks
arnav
Hi,

We are having a (client) database from where the data has be fetched and displayed on a dashboard.

To minimize the impact on this client database, the user account will have a limited number(say, 5) of connections allowed. But the no of user who access the
dashboard will be more than 5.

Can anyone please suggest what is the best way to achieve this?
Is it a good idea to create our own database in between and populate with the client data. The data in client database gets generated every month.

in other words,
I've a DB where only 5 connections to it are allowed...but the no of Users accessing that DB might be more than 5.

Database : Oracle 9i
Dashboard is implemented in Java.

Thanks,
Arnav
Hi All,

We have figured the solution. just wanna share with you guys...

Actually, the above logging is done by two load-balanced tomcat servers...(sorry that i didn't mention in my problem statement)
One server was using GMT and the other was using a different Timezone. So, there was this difference.

We just set the timezone environment variable("TZ") in startup.sh...and it was logging properly.

thanks & Best Rgds,
Arnav

ResultSet, Connection, PresparedStatment are all considered to be curosrs here.

1. Yes. As Velu pointed out, the code creates n(n is the size of the 'rs') PreparedStatement objects, but closes only one.
2. Also at line no 162, you are reusing the ResultSet object before closing its previously assigned ResultSet object.

Best Rgds,
Arnav
Hi All,

Any thoughts/Suggestions/Help ?!!

thanks,
Arnav
Ok. My mistake. My English needs improvement.

No Problem.

Here's what i meant:


Write a DAO(Data Access Object) that fetches the required data from your database. Call the DAO from JSP.
And make an AJAX call to that JSP from your javascript.


A less worst adivce or even worse?

Actually, i was trying to stress on AJAX - Calling a JSP from a JavaScript. Not on how to get data from DB in JSP.

ciao