icccapital Posted December 31, 2010 Share Posted December 31, 2010 I am creating a web application using JSF and MyBatis. It seems reasonable to want to keep all sql and connections in the MyBatis portion, but when doing some research I am not sure if that is the best thing for Jasper Reports. Does anyone have an opinion on this? Is it bad to pass a collection of javabean objects to Jasper as a datasource? Is it prefered to have Jasper access through JDBC directly the data? Thanks Link to comment Share on other sites More sharing options...
Teodor Danciu Posted January 6, 2011 Share Posted January 6, 2011 Hi, Only you can decide what is best for you. There are many things to consider, such as how often your data layer changes or how often the reports need to change.Or whether you want to leverage already exising in-memory data with your reports, or have your reports decoupled from your middle layer and get their data on their own. There is no such best practices as each application has it own requirements and what might suit one would not suit you and viceversa. What is important to know is that JasperReports supports any scenario you might decide to go with. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
icccapital Posted January 6, 2011 Author Share Posted January 6, 2011 teodord,Thanks for the reply, I know my question was very open ended, but your thoughts were helpful in clarifying my thinking. I guess what I was trying to figure out is if there is a significant overhead difference between using mybatis and object versus allowing jasper to access the database itself with jdbc. But based on your answer it would seem there isn't just more of a question of how many successive uses of the data and size of the data requested if I am thinking correctly. Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now