Chris Donald

Greenhorn
+ Follow
since Jul 15, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Chris Donald

Thank you for the reply.So when I remove the annotation @Transactional and have the transaction done manually,I was expecting it to work.But what I get is an exception.The application which I am working on is a Spring-hibernate based webapp where I have a spring xml file which has all the information regarding datasource,session factory and transaction.

Also,if I have the @Transactional on and have the code on for manual transactions,will two separate transactions be created?

Thanks for your insight.
Thanks a lot for the reply.I now know where to begin.


Regards
Chris
15 years ago
Hello,
I am not clear about the Java Web services space.There seem to be many APIs(JWSDP,Spring etc) and many ways of creating web services in Java.Which is the most commonly used API that will help me develop web services that can be deployed on various application servers.Also is Spring a good option for this?Please advise.

Thanks
Chris
15 years ago
Hello,
I am relatively new to unit tests.Normally,how many tests are required for a web application.Or is it that,any piece of code is to be unit tested?

Please advise.

Thanks
Chris
16 years ago
Thank you all for your response and help.

Regards
Chris
16 years ago
Thanks for your reply.The HashSet is useful.I have another question I don't have an answer to.Lets say that I have a Collection of 10 numbers.Is there a nice way to find out the number of occurences of a particulat number in the collection?For ex: number of times the numbers 5,4 and 7 occur in the collection.I know that we could use a counter to do so.But I am wondering if there is a better way of doing so?

Please advise.

Thanks Chris
16 years ago
Also,I did not use collections.I made a mistake mentioning it.

Thanks
Chris
16 years ago
Thanks Bear for your reply.What I meant to say was the following:

I have a method like shown below:

public boolean isSameRank(Card cardA,Card cardB,Card cardC,Card cardD,Card cardE){

if((cardA.getRank()==cardB.getRank())&&(cardB.getRank()==cardC.getRank())&&(cardC.getRank()==cardD.getRank())&&(cardD.getRank()==cardE.getRank())){
return true;
}

return false;
}

The goal here is to find out if there are atleast 3 cards here with the same rank.Instead of adding more AND OR Clauses to the code shown above,is there a better way of doing things.

Please advise.

Thanks
Chris
16 years ago
Hey Folks,
I have a collection of 5 Java Beans(eg:Card Bean).One of the properties of the Bean is rank.What is the best way to check if there are 3 bean instances that have the same rank?I know that one way of doing this is to loop through the collection

for eg:
if((cardA.getRank()==cardB.getRank())&&(cardB.getRank()==cardC.getRank())&&(cardC.getRank()==cardD.getRank())&&(cardD.getRank()==cardE.getRank())){
return true;
}

The above is only one combination.There will be others like comparing cardA to cardC or cardD or cardE.Is there a more elegant way of checking if there are atleast 3 cards have the same rank?

Thanks
Chris
16 years ago
Thanks for your reply Scott.I do have some understanding of JMS.With the help of MDBs in EJBs asynchronous calls can be made.But what I am not clear about is the application of MDBs and JMS in a high volume transaction environment.

Thanks once again.

Chris
Hello,
I know that JMS is useful in a high volume transaction situation.But is there a way I can simulate this situation and then design a JMS solution for this?

Please advise.

Thanks
Chris
Thanks Jeanne.I'll try it out.

Regards
Chris.
Hello,
I would like to debug my application which is running on Tomcat through Eclipse.I have already installed the Sysdeo plugin.I can therefore start and stop Tomcat through Eclipse.But how do I debug??

Please advise.

Thanks

Chris.
Hello,
I have 2 beans-the main one is the Account bean.I also have a bean called BillingAddress which is set into the Account Bean i.e:

public BillingAddress getBillingAddress() {
return billingAddress;
}
public void setBillingAddress(BillingAddress billingAddress) {
this.billingAddress = billingAddress;
}
Now I have 2 jsps-The first one is the Account.jsp.Once the user fills this up,he would be taken to the billingaddress.jsp.I have used the AbstractWizardController for this.Unfortunately,my second page is throwing errors.I am not sure how one references the second bean billingAddress in billingAddress.jsp

Any advice is appreciated.