One DAO per thread or threadsafe DAO?
Hi, I'm wondering if there's an approved practice in a multi-threaded app. Should I have one DAO per thread or simply make one DAO a thread safe singleton. ...
Hi, I'm wondering if there's an approved practice in a multi-threaded app. Should I have one DAO per thread or simply make one DAO a thread safe singleton. ...
i thinking of doing this architecture genericdao +interface ---> servicelayer+interface---> view layer my dao will only have generic methods, my service layers will have real logic for instance service layer method string executeThis= "select c from com.abc.test.User where username =:username"; Map tempMap = new HashMap(); tempMap...
Hi, I work with Spring/Hibernate Dao's for saving my Object in the Database. Now I had to backup all my DB inside my application. Now when I try to read my backup back, my application crashed. Now I found the problem for this crashing. It's Hibernate it creates automaticly a new ID for my Object when I want to save. For example I save...
I posted this to the spring forums, sorry for the xpost. I am new to spring. I am working on an existing project that uses spring 1.2.8 (old, I know), and java 1.5 so annotations should work. I am trying to use the @Transactional annotation on a concrete class, following the docs at: http://static.springsource.org/spring/docs/1.2.8/ref...
Ok I'm new at my job, and now I'm assigned to a project which uses Spring, Hibernate and Wicket. And I see a lot of DAO and Services packages and I want to understand why they're used and what is advantajes of this. I understand that DAO it's need for working with the databases, but I want more information. I need an overall, a BIG PIC...
Hi Guys, I have a fully implemented DAO and all my beans inherit an Entity object. Now, I want to create a client notification system whereby, when a user creates/updates/delete an entity to/from a persistence storage, a notification is automatically sent to the client via email. I have a DAO manager that uses a Factory Pattern to ret...
I found JPA, or alike, don't encourage DAO pattern. I don't know, but I feel like that, especially with server managed JTA managers. After adequate hands-on using DAO pattern, I started designing JPA based application around that pattern. But it doesn't fit in, IMO. I tend to lose quite a features of JPA and all. Well, suppose you fire...
Hi I am using Spring JdbcTemplate with the DAO pattern to access a database. Instead of creating the database tables manually, I am looking for a way to generate the tables in the DAO layer. I understand that I can use the jdbcTemplate to execute statements, I am only looking for the right place to do it. Is there a best practice for...
I am developing a web application with PHP and MySQL. I have an entity named, User, that has many one-to-many relationships (with other objects) within it (list of Addresses, list of Emails, list of PhoneNumbers, etc). These many addresses, emails, phone numbers are supplied to the user via junction tables in the database (user_link_addr...
I have a customer who uses Oracle BI Publisher. Today we have to write stored procedures and execute those from BI Publisher to get the data out. Similar to that we have to use DAOs to execute stored procs and get the data out. I wonder if it would be possible to integrate BI Publisher with DAOs that would get the data DIRECTLY from da...
Greeting , In my non-web application(using Spring,Hibernate), I parse a CSV file and populate db using following method. handleRow() is called everytime a new raw is read from CSV file. My domain model: 'Family' has many 'SubFamiliy' 'SubFamily' has many 'Locus' a 'Locus' belongs to a 'Species' Family<>SubFamily<>Locus...
Hi Guys I'm creating an online music store application (in Java) for signed and unsigned artist for my client. I'm currently using Struts 1.3.10 (I was recommended Spring but Spring setup is sort of similar to Struts) for my Web application. My Database is currently a MySQL 5 (or higher) and I'm using a DAO pattern to talk to it. Ther...
Will there be a performance improvement if I remove the entity bean (finder methods) and introduce the DAO layer instead. I want to do this mainly for reading data from the DB. I have a process in my project which has around 15 entity beans finder call in the flow, so if I remove the Entity beans or introduce a DAO and leave the entity b...
Is it typical to name DAOs in the following way: UserDAO - interface UserDAOImpl - implements UserDAO I am wondering if its standard to use the suffix 'Impl' for the implementation or if something more meaningful is the best practice. Thanks. ...
I am working on a project in VB.Net and need to implement the DAL. I am not quite sure where in my project is the best place to stick the DAOs. Should I stick the DAO in the same namespace as the business objects that are going to use them. Or should I lump all the DAOs together. I have a Java background which might taint my understandi...
What do you think? should your DAO return an IQueryable to use it in your controllers? Thanks in advance ...
I'm attempting to declare DAO variables in VB, but when I go to assignment statements, it says they must be declared. But I've just declared them in the line above! What's going on? Code: Public Class frmBaseForm Public acDb As dao.Database Public acRs As dao.Recordset acRs = acDb.OpenRecordset("Something") End Cla...
Is there any kind of out-of-the-box transaction management support for pure DAO in Spring framework? ...
The parts of any repository/DAO implementation worth testing are the queries. To ensure that these queries are correct, you'd have to run it in the actual database. Given the above facts does it make sense to unit test DAOs/Respositories? If yes what are the best practices? ...
Hi, I am converting an old application to use SQL Compact database (it works ok with SQ Server 2005 and 2008) and using the following code gives an error when attempting to execute a simple select command: Private Const mSqlProvider As String = "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;" Private Const mSqlHost ...