• Post Reply Bookmark Topic Watch Topic
  • New Topic

utility methods in stateless session ejb  RSS feed

 
peter brews
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
Ihave four diffrent busines methods in stateless session ejb which calls different uitility methods defined in the same ejb.
These ultility methods which are being called by lot of diffrent methods in the same bean.Also the business methods can be called by different clients at the same time.
Will there be any problem if call method in method.

for ex.
1. private String formatDateutility(String changeDate) {
..
..
..
return changeddate.toString();
}
2. private String getData(String abc){
...
String date1 = formatDateutility("20000212");
..
}
3.public String placeOrder(String order)
{
..
String getStatus = getData(order);

}
4. public String changeOrder(String Order)
{
..
String changeStatus = getData(Order);
..
}
Thanks,
smita
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what you are asking. Are you asking if it is okay to call a method from within another method? If so then of course it is.
Personally, I would factor out the utility methods that do not logically fit with the EJB into a helper class(es) and then call that from the EJB.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!