amit sharma

Ranch Hand
+ Follow
since Jul 19, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by amit sharma

I have a buffer class which receives message object. I have to pass this message object to other class. The condition is that if i have 1 message or n milli sec has elapsed, i have t send this messages object to other class.
I have different commands. I make interface with method execute. I make 5 concrete class which implements command interface. This concrete class instantiate in different ways. some require 1 parameter, some require 2. What is the best way to design a class which takes TypeofCommand as input and instantiate correct class so that client can then simply call execute method. TypeofCommand can contains information about which class to instantiate.
I make DAO for USER. I make a new connection in each method(CRUD) of DAO. I want to know what is the best strategy to handle transaction in DAO pattern. How can i call another DAO from DAO class.

David Newton wrote:Honestly, I'd just try searching for "eclipse +uml" first.


i also google for it but with many options i am confused, i try some of them but didn't vey happy with it.
i post question here to get most appropriate tool which many developers are using.
Is there any eclipse plugin which can geneate UML class diagram from jar file or code.
My intention is to learn design of struts, hibernat, spring.


Thanks in advance
I have a webapplication(simple jsp,servlets). There are some desktop applications running on same servers using same database. To increase the performance, i thought of using any caching framework(Oscache,ehcache). Jsp can retrieve some data from database and some other data from cache. A background application can put data into cache and update data at appropriate time. I can put cache in jndi and webapplication can access cache through jndi. The data in cache will change later in application lifetime.
Is this is a good way to use cache across application or there are better way to do it.
Please also give the name of some free jndi/ldap servers.
I have transaction of statements .I am settings AutoCommit to false.But when an error occurs for data truncation in 2nd statement ,it not rollback the changes done by other statement .My need is whenever any error occurs ,the whole batch should be rllback.
Thanks

Ulf Dittmer wrote:That depends on your requirements, about which we know nothing.


Sorry for stupid and incomplete post .
My requirement is like
I have one table(col1,col2,col3) .There are many columns but my where clause doesn't need it . There are about 3 frequent query
against this table .One query is select on col1(primary key) .Second query is order on col2(int type) . third query is order on col3
.col1,col2 are constant whereas there are frequent updation on col2 .
I want a snapshot of database .Instead of taking data from database ,i can take it from cache .
15 years ago
I am developing a web application .To reduce database load ,i want to cache data which to common to all users .I search a lot for caching framework and find quite a lot(OSCache,EHCache,JCS,Open Terracotta) but now i am confused which to use.Can anyone please tell me which to use
15 years ago

Originally posted by Anil11:
you can pass parameters like this

on page1.xhtml

<ui:include src="page2.xhtml">
<ui:param name="param1" value="one"/>
<ui:param name="param2" value="two"/>
</ui:include>

page2.xhtml

<h:commandLink action="${bean.prevPage}">
<f:param name="prev" value="#{param1}" />

</h:commandLink>

<h:commandLink action="#{bean.nextPage}">
<f:param name="next" value="#{param2}" />

</h:commandLink>

on the backing bean you can access params ..

public String nextPage() {
String nextPage = (String)
FacesContext.getCurrentInstance(). getExternalContext()
.getRequestParameterMap().get("next");
return nextPage;
}
public String prevPage() {
String prevPage = (String)
FacesContext.getCurrentInstance(). getExternalContext()
.getRequestParameterMap().get("prev");
return prevPage;
}


Thanks for your reply .
But if some users don't want any parameters i want to use some default value for that parameter.
15 years ago
JSF
my code is

I want to pass parameters to DropDown.xhtml .But not everyone will pass parameters to tag .If someone not pass the tag then it should use some default value.
Thanks
15 years ago
JSF
I am using FacesMessage for writing message . my code is


But this message is added twice .I can't use clear as there are other messages.
I want to check whether a message is present for this key is not .If it is present then i can add message otherwise i leave it .
16 years ago
JSF
I am using rich faces a4j library.
When i try to use pass data like 'Nov 6 , 2008' to bean it gives me error
Argument type mismatch.
My code is


How can i pass the date through ajax call.
When i am submit the form without ajax call ,i am able to get the date properly.

Thanks
16 years ago
JSF
I am using ROME for generating rss files . My client wants that user can subscribe to rss based on search query.For that i need to generate so many rss files .Is there any better way to do it.

Thanks
i need to know the country of user so that i can apply customization for that country.
Thanks
16 years ago
JSP