Chandra Sekar

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

Recent posts by Chandra Sekar

I want to use Java 5 features (especially autoboxing) within my Jasper Reports. However, iReport doesn't seem to provide an option. I'm using iReport 3.6.1.

I have tried the suggestion provided here but had no luck with it either.

Has anyone here managed to use JDK 1.5 with iReport 3.6.1?
Hi,

I create a page for my project's site using the APT format. I specify the title for a page as below.

When I generate the site, the title in title bar looks like this "<my_project_name> - -". As you can see the title for the page is missing. Instead I get a box with the word "Overview" at the top of my page content.

Could someone help me in fixing it?
15 years ago
Specifying the <type> tag in my .tld file fixed it.

Also, your understanding of rtexprvalue is wrong. It has nothing to do with the type of attribute in tag class. It determines whether or not the attribute accepts an EL expression as its value or not.
15 years ago

Peter Johnson wrote:You could find forgiveness for your sins if you would post the solution...


Using ${groupId}, ${artifactId}, ${version} and ${package} in the files does the trick. These get replaced by the value defined for the corresponding properties during project creation.
15 years ago
Hi,

I have a custom tag which can accept either a Date or a String for its "value" parameter. Hence I declared the property type as Object in my tag class. When setting a date to this attribute, I get the following error in Tomcat.

java.lang.NoSuchMethodError: <MyTagClass>.setValue(Ljava/util/Date;)V


However, the same code works fine in Glassfish. Which of these two behaviors is the correct one?
15 years ago
Oh my bad!

I found the solution myself.
15 years ago
Hi,

I have been creating a custom archetype for maven. I want the content of web.xml of the generated projects to vary based on the groupId of the project.

Can something like this be achieved in the archetype creation itself?
15 years ago
I have never worked with earlier versions of Sun's app server. However, for 9, deployment of apps are managed with a web interface. Visit http://localhost:4848
Oops! I didn't know about this library. I thought he was creating his own library. Thanks for pointing out.
16 years ago
JSF
Use AJAX4JSF from Richfaces.
16 years ago
JSF
Coming from a Spring + Hibernate background, I found EJB 3.0 to be much simpler to develop and deploy similar applications. It needs very very little XML (only persistence.xml). Though Spring does have annotations now, it still needs a bit of XML.

Additionally, I find not having to bundle a container, ORM framework, logging framework, collections framework, bytecode manipulation framework with all my apps nice.
Hi,

I have a JSF web application where I configure 2 layers. Controllers performing presentation logic, Services handling transactions and DAOs performing actual access of entities.

The Services and DAOs are configured as application scoped managed beans. The controllers are defined with request or session scope based on its purpose.

I have used annotations to inject UserTransaction into Services and EntityManager (not EntityManagerFactory) into DAOs. One service method can access more than one DAO.

I read that EntityManager is not thread safe. So is it a better to inject EntityManagerFactory into DAOs rather than EntityManager? If so, what overhead will creating and closing multiple EntityManager instances within a single transaction cause?
Wow, what a quick response! Thanks a ton for all the time spent in solving my naive queries.
That makes it pretty clear. I'd definitely look into the book(s) you suggested.

One last query, In case if I add a domain specific behavior to one of my mutable (used for CRUD operations in UI) entities, which would be invoked by my service but not relevant to client, is it a good idea to make the entity implement an interface which would expose only relevant operations to client? I felt this would help in solving my first query in this thread. But I don't know whether it is a good practice.

Originally posted by Eric Nielsen:

Other possible refinements...
a) introduce a "LoanedBook" class that holds a Book, a Customer, and the return date, customer to it. Convert the book to a purely immutable class. Now Book is perfectly safe to return to any client code... You won't be able to ask a Book who has it -- you'll have to see "for this book, is there a checkout, if so, who has it?"

b) the constructor for LoanedBook, or the factory method returning a LoanedBook, would now contain all the logic about when a checkout is allowed, and what duration to set for the return. To me this would seem much cleaner than embedding that within the book, and the customer.



Thanks for the awesome explanation and suggestions. While Book object as such cannot be made immutable as there would be CRUD operations editing its state, the idea of creating a LoanedBook class is interesting.

Is there any thumb rule to be followed when deciding between using a mapping class like this and putting the relationships directly within the entities?
[ December 31, 2008: Message edited by: Chandra Sekar ]