Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

Dhananjay Inamdar

Ranch Hand
+ Follow
since Jan 27, 2003
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 Dhananjay Inamdar

Hi


I am agree with what Bill mentioned in his reply "If you are looking at a stateful web application with controlled navigation with well defined flows then I would consider using Spring web flow.".

I am currently working on the web application where we are using both Spring WebMVC and WebFlow.

At first we will look at Spring WebFlow usability: user has to go through certain steps to purchase our products, it is more or less like shopping cart of any web application to add products, review cart, payment details, terms and conditions and then checkout. So Spring WebFlow can be used for these types of application where there is certain flows/ steps user has to go like installation Wizard of any software.

Spring WebMVC is more requested oriented framework, which works on the FrontController design pattern. Here DispatcherServlet accept the request and figure out which controller to passon the request to, this time it will do handshake with WebFlow to execute a perticular flow.

You will find best tutorial which will explain both in here http://www.ervacon.com/products/swf/intro/index.html.

It is not mandatory to use Spring WebMVC, you can use Struts or any other framework with Spring WebFlow, but Web MVC is more prefereed as both from Spring and integrates very well.
5 years ago
Hello All,

I am pretty new to the webservice area.

In our organization we mostly have to consume web services exposed by our technology partner. I am suggesting to use JAX-WS tool to generate the web service client using wsimport command.
Problem is our technology partner has provided us three different WSDL file URLs for DEV, QA and Prod environment. We have to make sure to invoke appropriate URL from our respective environment.

JAX-WS generates three different clients when we provided three differnt WSDL URLs, which is a problem.

We use Maven to build our projects but we are not allowed to use build parameter like generate war for DEV or QA or Prod. Also we cann't maintain three different versions of project with the only difference in POM file about denepndency on which webservice client.

I am sure this is not first time some one facing this problem.

Please do let me know the solution you guys are using to resolve this.

Thanks
5 years ago
Hello All,

I have 2 collections, first holding the list of ticket’s Ids like T1, T2, T3 etc.

Second holds the list of objects which is TicketUsageDetails. This object has ticket-id in it as well as some other attributes.

Now I have a method getTicketDetailsByUsingTicketIDs, which accepts the first collection (list of ticketIds) as an input parameter.
Then this method calls the DAO method, which uses this list of ticketIds in the SQL queries ‘IN’ criteria.
This DAO method returns the list of TicketUsageDetails objects.

So now my input parameter list has list of ticketIds and the list which I got back from DAO has list of TicketUsageDetails, which has ticketIds in it.

Now I have to create a Map out of these2 lists, which will have structure like MAP<String ticketed, List< TicketUsageDetails>.

To create this map, at present I am looping both the lists but this is taking too much time, since for every TicketId of the input parameter list, I have to traverse inner list of TicketUsageDetails that many times.

At high level steps of my method as follows


I want to replace this looping logic with some good performance efficient way.
Please do let me know if you have any option.
7 years ago
Hello All,

I have deployed many different war files in the JBoss server and as a business requirement people from the other team need to see the list of wars deployed under Jboss along with versions of war files like

ABC.war (Maven version) 1.0.0
PQR.war (Maven version) 1.0.0

I am not sure how to read the versions of deployed war files for this requirement.

Please let me know if you have any solution.
7 years ago
Hi Mark,

Thanks for the reply!

I cann't create a statement which will delete all the required records in one shot, since this is how the nature of the application. I have to select all the records from the table and process each record one-by-one. If process is succesull then delete that single record.

BUT, after reading your reply I did review my code and find out that I am closing statement and connection but not Hibernate Session. So I did close the Hibernate Session also after connection and that thing solved my problem.

Now application is not stopping after 14th record and deleting all the processed records.

Thanks once again!!
Just to add more information, on 15th time application is hanging on the following line

_st = _con.createStatement();

Of this Delete() method.

Please help me solving this problem.

Thanks in advance!
Hello All,

As a part of my enterprise application, I have one functionality, where code selects all of the records from one table and process them one by one. If the record gets processed succesfully then application deletes this record, if not, then set the 'Processed' flag to 'NO'.

When ever I am executing this piece of code with 300 records in the table, application select all of the records and starts processing them one by one. First 14 records getting processed properly and as per the flow records are getting deleted also from the table.

When it crosses 14th record then on 15th application processed the record but after that when it tries to delete this record application just hangs. I am not sure why application is not able to delete 15th record.

If you stop the application and restart it then again application will delete first 14 records and will stop on 15th record.

Code of my delete method is as follows

<blockquote>code:
<pre name="code" class="core">
public void delete( BatchEntry batchEntry )
{
Connection _con = null;
Statement _st = null;
try
{
_con = getHibernateSession().connection();
_st = _con.createStatement();
_st.executeQuery( "Delete from BATCH_ENTRIES where ID = " + batchEntry.getId() );
_con.commit();
}
catch ( SQLException _se )
{
try
{
_con.rollback();
}
catch ( SQLException se )
{
m_log.error( "Could not rollback DB connection", se );
}
m_log.error( "SQLException while deleting record from BATCH_ENTRIES, exception is : ", _se );
throw new FitnessRuntimeException( _se );
}
finally
{
close( _st );
close( _con );
}
}

</pre>
</blockquote>


Please do let me know if you need any more information.

Thanks
[ July 16, 2008: Message edited by: Mark Spritzler ]
Hello All,

I am using JBoss 4.0 as a application server. One of the class of my application reads the key, value pairs from property file and stores it in JNDI. I have written a testmethod also, which accepts the key and returns the value using JNDI lookup. Everything is working fine.

Now when actual client tries to lookup for any key, appication is throwing an exception javax.naming.NameNotFoundException: <<app.web.service.url>> not bound.

I am not sure when testcase is able to lookup the key in JNDI why client is failing to lookup the same key.

Please let me know your comments.

Thanks in advance!
Hello All,

The problem got solved, but with wiered solution.

After trying many options, then I just commented all the implementation of webService and returned hardcode 'true' from the delegate itself. After building an application, application called the method properly till delegate.

Then I have un-commented implementation and again build the source code. This time everything worked fine.

I know this is not a solution and it will not work for anyother. But I am posting it as my experience.

Thanks
10 years ago
Hello All,

If you have any solution to my problem, then please do let me know.
This is urgent!

Thanks in advance!
10 years ago
Hello All,

While posting my question, I made a samll mistake. In the last paragraph of question I have mentioned that

The control even goes to the first line of this method; it is failing immediately on invocation.

Please not that control is not goes to the method, so read it as follows

The control even DOESN'T goes to the first line of this method; it is failing immediately on invocation.

Thanks
11 years ago
Hello All,

I am using Axis 1.4 webService in my application, which is in production on JDK 1.4. Everything was working fine till today. Today I have added one method, which is taking String as input parameter and when I am invoking that method from client, I am getting following error



I have already verified that while calling this method, my String input parameter is not null.

Initially client was sending user�s ID to the webService. At that time I have added following method in webservice and it was working fine



Now due to some of the business requirement change, client is sending me user�s email address, so I have added following method in webservice and this is not working



The control even goes to the first line of this method; it is failing immediately on invocation. I have verified all generated stubs and other source files and every where this method has proper signature and everything.

If you have any idea, how to solve this error then please do let me know.

Thanks in advance!
11 years ago
Hello All,

Thanks for the reply!
I will work on your suggestions and let you know the findings.
Hi Atul,

What is this



package import com.example.model does not exist



it should be either package or import.
Hello All

I am trying out the Authentication in my example.

I have added following code in my webapplication DD



I have this code in side <web-app> element, but then also when I am accessing this web-application in the browser container is not asking me to enter credentials.

Please let me know if I am doing anything wrong.

Thanks in advance!