Anirudha Joshi

Greenhorn
+ Follow
since Apr 08, 2005
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 Anirudha Joshi

Is there any way to transform struts HTML tags into normal HTML? I want to use struts HTML tags becuase of lot of things(like data retaining)is automatically taken care of.

- Anirudha
18 years ago
Thanks for the reply...But issue is still not resolved.....Just to give it a try I wrote following in my tag handler's doEndTag method...

pageContext.getOut().write("<html:text property=\"name\">");

<html> tag written by tag handler is treated as string and does not gets evaluated.

- Anirudha
18 years ago
Hello,

We have a requirement where input controls of the screens are customizable. For each screen label, there is a entry in the database which decides what type of control(input box, radio, textarea, listbox etc.) would be displayed for the label. To avoid writing if else blocks in the JSP and to reuse the code, I have created a java bean method which returns HTML code based on the display type passed. Something like this

public String getControl(string displayType,String id)
{
if(displayType.equals("TEXT"))
return "<html:text property=id>";
else if(displayType.equals("TEXTAREA"))
return "<html:textarea property=id>";
and so on.......
}

in the jsp......I do
out.println(bean.getControl(displayType,id));

Issue is HTML code returned by bean is treated as normal string and struts HTML tags are not executed by the server. When the page is displayed, it does not show any input controls....if I do "View Source" I can see <html:text property=id> is a part of HTML.

How do I force JSP engine to resolve these tags? Any other solution to achieve such requirement? Please advice.

- Anirudha
18 years ago
Hello guys,

I am trying to load balance JMS messages in my application and here is what I have setup.
1. I have a admin server and two managed servers MS1 and MS2. I tied them up in a cluster.
2. I created a JMS connection factory and deployed it on the cluster
3. then I created a distributed destination queue (DQ) which is deployed on the cluster and it has members from MS1 and MS2.

Now when I run my application and post the message to the destination queue, messages are distributed correctly and are balanced between MS1 and MS2 queues.

then I created one more JMS server (with a queue destination) on admin server and added that JMS server in the Distributed destination queue (DQ). Now when my application sends message to the DQ, all the messages are going in the default server queue only. They do not go to the MS1 or MS2 queues. I also tried by un-checking server affinity option of the connection factory but it doesnt work.

What is the problem? Why messages are not load balances across multiple queues?

Please help.

- Anirudha
18 years ago
Its not Momento...Its Memento :-)
Hello,

I couldnt understand following Design Patterns very well. I will appreciate if anyone explain it with real time example
1. Mediator
2. Momento

Anirudha
I am doing the filteration in the Model as this is used by multiple views. Data is retrieved in two steps. First from the database input source and then from the specific APIs.
Filter set on the attributes which are getting retrieved from the database is not a problem, as I convert the filter criteria before firing SQL query and append it in the base query. This works good for me as data is filtered at the database level and once retrieved my code just wraps it in the final dataset. Issue comes when filter is set on the attributes which are getting retrieved from the APIs. I am not sure what code should I write tp apply the filter. Do I need to add the resultste into collection and then loop through it and apply filter or do I need to use XPATH.

Stan, u talked about using reflection. I couldnt understand it. Can you please elaborate your idea with an example.
18 years ago
But the issues is what approach should I take to filter the collection. How do I filter the dataset? What code should I write to achieve this?
18 years ago
am developing a screen on which user can see various details of an Employee. Details includes fields like Name, Date Of birth, Salary etc.
Server side code retrieves data for an employee using different data sources. Some fields are retrieved from the database using JDBC while other are retrieved from external system using API calls.

Now, application also allows end-user to configure different VIEW filters and end user can apply them while viewing the data. For ex: User can setup a filter as "Show Employee where firstname like 'A' and DOB > '2/2/2000'.

Issue is, how do I filter the dataset?

If user sets a filter on the attribute which is getting retrieved from JDBC, I can append this filter in the SQL string as WHERE clause (for ex: where emp.first_name like 'A%'). So no issues for SQL fields.

But how do I apply filter criteria which is set on the non SQL attributes?

One of the solution which I tried to implement is converting final dataset into XML and then applying filter using XPATH. But as I understand XPATH can be used only for String and numeric values. It can not be used for dates and filter criteria like "WHERE DEPTNAME IN A, B, C, D).

Any ideas?
18 years ago
I am developing a screen on which user can see various details of an Employee. Details includes fields like Name, Date Of birth, Salary etc.
Server side code retrieves data for an employee using different data sources. Some fields are retrieved from the database using JDBC while other are retrieved from external system using API calls.

Now, application also allows end-user to configure different VIEW filters and end user can apply them while viewing the data. For ex: User can setup a filter as "Show Employee where firstname like 'A' and DOB > '2/2/2000'.

Issue is, how do I filter the dataset?

If user sets a filter on the attribute which is getting retrieved from JDBC, I can append this filter in the SQL string as WHERE clause (for ex: where emp.first_name like 'A%'). So no issues for SQL fields.

But how do I apply filter criteria which is set on the non SQL attributes?

One of the solution which I tried to implement is converting final dataset into XML and then applying filter using XPATH. But as I understand XPATH can be used only for String and numeric values. It can not be used for dates and filter criteria like "WHERE DEPTNAME IN A, B, C, D).

Any ideas?
18 years ago
Hello All,

I have a requirement wherin a application should get scheduled based on user configuration. User gives some name to this configuration, provides a criteria to select records from the database to work on and then provides scheduling information. Scheduling can be daily, monthly, yearly etc.

I developed standalone application which can do this activity. But how and when do I schedule this application ? Scheduling is not static and is different for each configuration. Any ideas?

Anirudha
18 years ago
Hello,

I am constructing a DAO which uses PreparedStatement to retrive data. DAO calls back different methods on the calling application to get SQL query, its parameters and other details (which are required to construct statement). Input parameter data types can be Int, Long or String.

As a common approach, can call call setString on all input parameters? Does it have any performance issue?

Anirudha
JMS
Hello,

Somebody please answer this.

Here is the scenario.

I have two JBOSS server instance running on two difference machines. BOX1 and BOX2. I configured the JMS queue on BOX1. Queue messages are persisted in the Oracle database. Web application running on BOX1 and BOX2 pushes messages in the queue configured on BOX1. And I have a JSP page which browses through the current messages of the queue and displayes it on the web page.

But now what is happening is, when a message is pushed from BOX1 web application to the queue, JSP page displayes this newly added message. But when a message is pushed by BOX2 web application, JSP does not show that message till I restart the BOX1 JBOSS. However If I see the record count of JMS_MESSAGES table, it returns the exact count.

Whats the problem and how do I resolve it?

Anirudha
JMS
Here is the scenario.

I have two JBOSS server instance running on two difference machines. BOX1 and BOX2. I configured the JMS queue on BOX1. Queue messages are persisted in the Oracle database. Web application running on BOX1 and BOX2 pushes messages in the queue configured on BOX1. And I have a JSP page which browses through the current messages of the queue and displayes it on the web page.

But now what is happening is, when a message is pushed from BOX1 web application to the queue, JSP page displayes this newly added message. But when a message is pushed by BOX2 web application, JSP does not show that message till I restart the BOX1 JBOSS. However If I see the record count of JMS_MESSAGES table, it returns the exact count.

Whats the problem and how do I resolve it?

Anirudha