architecture « Development « JPA Q&A





1. When can/should you go whole hog with the ORM approach?    stackoverflow.com

It seems to me that introducing an ORM tool is supposed to make your architecture cleaner, but for efficiency I've found myself bypassing it and iterating over a JDBC Result Set ...

2. unit of work pattern and history    stackoverflow.com

In this page:
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/transactions.html I have read that: "A unit of work is a design pattern described by Martin Fowler" Did Martin Fowler discovered this pattern before hibernate boys and ...

3. jax-ws web-service tier to the hibernate-based data provider    stackoverflow.com

A data provider (java, hibernate) has an API for accessing instances of JPA-annotated classes. A web-service (jax-ws) is exposing the API to the network clients. A bit of a problem I'm ...

4. Hibernate 2.1.6 or 3.x?    stackoverflow.com

We are in the process of revamping our persistence layer from some proprietary orm. Most of our developers are already familiar with hibernate 2 and also its gotchas. So we decided ...

5. Does NHibernate employ object interning?    stackoverflow.com

Why this code works? Does NHibernate employ object-interning? If not, the following works because NHibernate overload Equals operator?

foreach (var c in s.Query<Country>())
{
    Console.WriteLine("\n{0}", c.CountryName);

    // code ...

6. Documents-oriented architecture and hibernate. Starting point    stackoverflow.com

I want to create architecture like this (abstract scheme):

abstract class Document
 - number
 - autor
 - createDate

class Order extends Document
 - cost
 - client

class Discount extends Document
 - value
... Should Document class ...

7. common services in layered architecture    stackoverflow.com

I read in many books that in a layered architecture a layer should only use the services provided by the layers below it. The commonly used layers are in an enterprise ...

8. Hibernate architecture best practice    stackoverflow.com

I recently had to troubleshoot a performance problem with a slow grid load. Upon investigation, it looked like someone had used a List<Product> to populate the grid. The problem ...





10. hibernate follows MVC2 architecture    coderanch.com

11. Hibernate in a multi-server architecture    coderanch.com

Hi, I would like to use Hibernate in an application with several servers that need access to the same DB. Do I have to instanciate hibernate on each server or is it possible to use only one hibernate instance on one server only? Is there any example on how to do it? My application needs to use several servers because the ...

12. Questions about Architecture with Swing and Hibernate in a client/server application    coderanch.com

Hi, I'm working since last week in a much older application, and it seems to me that something is wrong. It's a Swing application making database acces in a long distance server, sometimes with Hibernate, sometimes directly with JDBC, because they say that hibernate is not efficient enough with complex queries. I didn't have time to llok deeper in the application, ...

13. Is there a (widely) accepted architecture regarding the use of Hibernate?    coderanch.com

Hey everyone, I'm new to these here parts and I have (what I think is) a basic question: Is there any accepted architecture to use with Hibernate? I got the basic DAO design to work which I learned from the book: Java Persistence with Hibernate (by Bauer/King). But I'm lost on how to use it. Am I supposed to replace every ...

14. Shards for Multi-Tenant Architecture    forum.hibernate.org

Is Shards a good solution to implement a Multi-Tenant architecture? I'm using Spring3/Hibernate and trying to build a fun little web-based game. A user first logs into the web app and it shows them their saved games or allows them to create a new game. From there it launches them into their game. I was thinking about having a "master" database ...

15. Help with architecture! 2-tier/3-tier    forum.hibernate.org

Hello, I'm currently trying to re-design a project to use Hibernate2. The system is handling complex objects, objects built by other objects (as usual). Layer description I have the following conceptual layers: * presentation * middle * business * integration 1. Presentation Contains the system UI components and controllers. 2. Middle A layer that should hold as a strong interface against ...

16. Good example application for a layered architecture    forum.hibernate.org

Ilja wrote: I allready pretty much did. The thing is: I don't have much time. I'm working on a project which requires results quite soon. They want it quick 'n dirty, I want it properly. Having some example of how to use hibernate in a layered architecture (DAO-pattern) would help bigtime. Hibernate is not a good choise for "quick 'n dirty" ...





17. Architecture question    forum.hibernate.org

It seems that most people use Hibernate within an J2EE server. In my case, I wish to use Hibernate / Sybase in a multithreaded Java server which is called by means of 1) webservices from several clients and 2) internally by the server, by several threads (i.e. when particular business events occur, etc.) Note that the WebServices server is also multithreaded. ...

18. Architecture question    forum.hibernate.org

(I first posted this to the beginners group, but I realize it fits better here... sorry) It seems that most people use Hibernate within an J2EE server. In my case, I wish to use Hibernate / Sybase in a multithreaded Java server which is called by means of 1) webservices from several clients and 2) internally by the server, by several ...

19. aggregate vs composition and architecture help    forum.hibernate.org

I'm a bit confused here. I have an "Accounting Item" (which is a set within a larger object) object that contains a "Worker" object. Each accounting item is unique, and there is a seperate list of employees. Each accounting item contains one worker and more than one accounting item can contain the same worker. So its like a one directional aggregate. ...

20. dumb architecture question: part 1    forum.hibernate.org

Hey guys, Somewhat of a 'newbie' question as for better understanding the best practices. I want to build a small web application which just allows a web interface to update a db schema. Nothing complicated about that. Now I have used hibernate in the past but not with DAO's and it was a read-only app. Since this application is very small(ie, ...

21. Best Practices for J2ee Architecture    forum.hibernate.org

Sorry if this is posted somewhere on the forum. I searched for 2 days and have found a lot of posts on the topic, but I feel some of it is outdated. I was wondering as per the newest 'production' release of Hibernate what is 'A' suggested architecture for a production level j2ee application. I saw some posts about using Session ...

22. Multi-tiered architecture + CGLIB    forum.hibernate.org

Hi, I have a persistent bean, that uses lazy loading with CGLIB. Hence, I need to have cglib.jar in my classpath. Is there any possibility to remove any dependancy between my bean and cglib.jar once my bean is fully loaded? doing so I'll be able to send my bean to the presentation layer which doesn't have cglib.jar in its classpath. i ...

23. Architecture/Development method question    forum.hibernate.org

Hello. I'm currently on a project who will probably use hibernate for the O/R mapping. Its quit a first time for everyone, and we stumble among some question about the best approach to use. Some information about the situation : - We have a small (50-60 classes) but rich domain model (including heavy use of wrappers and delegation, custom collections, inheritance...), ...

24. Architecture for rich clients and no application server?    forum.hibernate.org

I'm trying to write an app that connects directly to the database and uses hibernate to access the database contents. The app is single thread, swing based, directly connected to the database, that is, the usual rich client. Now, what is the suggested pattern for this kind of app? Consider the following example: I want to model into the database something ...

25. look for Architecture advice    forum.hibernate.org

hi i want to implement three tiered application with a java server background and .net client part . I plan to use "JANEVA" a borland connector to my server J2ee side ,and it's just compatible with EJB or CORBA. right in the server side i want to persist data with HIBERNATE cuz CMP sound bad for me (i just begin in ...

26. Architecture for printing    forum.hibernate.org

Hello to everybody This is my first post here, and I must admit: it is quite off-topic. Please don't blame me :) The question is about architecture. I'm managing a project aimed to rewrite an old software, and I choosed JBoss (for sessions and transactions) + Hibernate + Struts. Everything fits well in this architecture, except printing: the old software was ...

27. any architecture patterns on services sharing data???    forum.hibernate.org

Are there any patterns out there for this kind of situation... Have 40 products/services across a company. These products duplicate much administration data because they all deploy separately. I would like to somehow define the data contract, something like tables A, B, C for service 1, and B, D, E for service 2, etc. There would be admin web pages for ...

28. architecture question    forum.hibernate.org

Quote: Intermixing business logic with Hibernate API calls is not a good design choice, IMO. DAOs serve a very useful purpose in isolating persistence (Hibernate) logic from business logic. of course, use DAO. Just one example swithing from hibernate 2 to hibernate 3 need to change all hibernate imports. If you also want to take advantage of new features, using DAO ...

29. hibernate w/ remote client/server architecture    forum.hibernate.org

I need some help/recommendations/suggestions. I need an architecture which will support a 3 tier system consisting of a swing client which remotely acceses my business objects from a middle tier that performs lightweight business logic. I would like to use something like the dto pattern with my business objects to increase performance between the swing client and server layer. I am ...

30. Data Service Architecture Question    forum.hibernate.org

31. Application architecture    forum.hibernate.org

We want to create Java objects which encapsulate certain aspects by creating a service interface. These services are backed by some database tables. Now we have some decisions which need information of all kinds of services. With SQL you would do a big join over a lot of tables and get a small result. Using OO you would ask service A ...

32. Approving Hibernate for new architecture - General Questions    forum.hibernate.org

So I have a new architecture that is being created at my work to take an application inhouse and fully rewrite it. There will be times that we will be integrating with the old system and the new system as we migrate new functionality one piece at a time. I have reviewed Spring/Hibernate/iBATIS and really think that Hibernate is an excellent ...

33. Architecture with Hibernate question    forum.hibernate.org

Hi all. I tested Hibernate cache and it works very well. My problem is that 2 sessions will not return 2 objects wich are the same instance (do not compare correctly with ==). I know this is a feature, not a bug and I understand why it is this way. But my problem is : Objects have properties that are mapped ...

34. Swing Application architecture    forum.hibernate.org

I'm just starting the refactor of an existing Swing App that presently uses a home rolled DAO with the intention of using Hibernate 3 as the data access and persistance layer. I'm unsure about best practice for instantiating a SessionFactory - I know that it is advisable to have just one SessionFactory - but what is the accepted / best way ...

35. THINK : Hibernate in Service oriented architecture    forum.hibernate.org

Hibernate version: 2.1.8 Hi all, I've got a conceptual question about hibernate. I've got a service which have two functions public Entity service.get(Entity) public Entity service.update(Entity) I've got to implement a business rule apply on a property of Entity object in update function. The problem is : The two methods are call in the same transaction which is propaged by Spring ...

36. Architecture question    forum.hibernate.org

Hello All, We currently have a Java based non-hibernate server and Mac OS X native client. We are planning to replace the non-hibernate server to hibernate one. Currently, our client (non-java) sends requests in XML format. For example, say i've table called TABLE1 and it has 10 attributes. In order to create a new entry in that TABLE1, the client will ...

37. Hibernate3 in n-tier architecture.    forum.hibernate.org

Hi, I'm quite confused how Hibernate3 works in n-tier architecture. Look at this real system example. I have n-tier system. It's really quite big architecture with about 25 applications - ears. Some of this application uses Hibernate, some do not. Let's considered application that is responsible for importing and serving data. It uses MDBs and Hibernate3 bulk operations (hundred of thousands ...

38. Collocated Architecture    forum.hibernate.org

Hi, I use Hibernate in a collocated architecture where the web, service and data access layers are located on the same JVM. The architecture I have chosen allows the domain layer to span across the web, service and data layers. The data layer is responsible for storing/loading the domain objects, service layer responsible for transaction demarcation and some minimal business logic ...

39. Hibernate Architecture Question    forum.hibernate.org

pull a "Customer" from the database. do a toString() and you'll see that the class type is not really your Customer. It's an instance of a class that is generated at runtime. google "Proxy Design Patern" to learn more about these classes . to anyone, I'm sure plenty of you have looked under the "work" directory in Tomcat . You can ...

40. Integrated DataModel Architecture + Hibernate    forum.hibernate.org

Hello, I'm wondering if anyone has any experience is leveraging Hibernate in a non-traditional, integrated architecture. I'm trying to create an architecture that allows us to leverage the power of Hibernate's programming model (transparent persistence) while understanding that I have a complex datamodel that is realized by multiple integrated databases, JCA services, web services and flat files. Creating the integrated datamodel ...

41. Architecture of Hibernate 3.0    forum.hibernate.org

42. Architecture Question    forum.hibernate.org

Newbie Joined: Mon Feb 27, 2006 7:58 pm Posts: 4 Location: Minnesota Hello. I've recently taken a new job and have been exposed to Hibernate for the first time. I was hired to write a front-end swing application for data entry and analysis. The other developer has already spent months creating a fully-functional Hibernate-based ORM system that covers the entire database, ...

43. Architecture question?    forum.hibernate.org

Hibernate version:3.0 I have a question about a composite key. If I use this kind of key (what is of course not recommended) I have approprieate properties inside my persistent object that store my composite key. Does additionally exist some associated object that store my coposite key?. Do I have to define class for object that store my key? I ask ...

44. hibernate in distributed architecture    forum.hibernate.org

reffering to code below Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); as in above code. the transaction in associated with one session, but my requirement is to attach one transaction with two sessions. or is the case is that, using one session object i have access to both database servers?? like.. session.save(FirstPojo); // One DB server session.save(secondPojo);// Other DB server session.getTransaction().commit(); ----------------- in ...

46. Good links for architecture    forum.hibernate.org

Hello friends - I think I've got the basic O/R mapping deal down. What I seem to be lacking is the vision to put together an architecture to integrate Hibernate in and do things that way (I think) they should be done. For example, I've got a parent child relationship I'd like to populate every time I grab the parent; and ...

47. Hibernate in action - architecture question    forum.hibernate.org

Reading the book hibernate in action I was interested in noting a certain bias towards using the generated hibernate objects in the business layer - rather than separating concerns and having the data layer its own subsystem. To be honest that is what I have always done with reasonable success but now that I am embarking on an extremely large object ...

48. general problems with Hibernate architecture - please advise    forum.hibernate.org

Hi, I've been working on a project involving Hibernate for almost a year now, and the more complex the project gets, the more issues arise. So I wanted to ask for some advice before the situation becomes unbearable. The main problem I'm facing is a collision between using criteria/filters and doing updates/inserts on detached objects. It looks like when performing criteria ...

49. Hibernate and Application Architecture    forum.hibernate.org

Hi there I am wondering if the following is possible and also good practice. My idea is to produce a single hibernate API jar that would be made available to any application wishing to access our db applications This seems to make sense on a design/maintence level. My problem was how to make all mapping documents available to the hibernate API. ...

50. Architecture question - Multiple Ajax requests    forum.hibernate.org

Hi everyone, I'm fairly new to Hibernate, so I'm sorry for what may be a newbie question. My question is architecture/design related. I'm hoping you can provide some insights before I start designing/coding. The A in Ajax stands for Asynchronous - meaning I can do multiple interactions on a given page without waiting for the previous request to finish up. This ...

51. Does Hibernate support a hot-deploy architecture?    forum.hibernate.org

I do not think there is a way to change the mapping data from your apps Configuration class. You can get the data out of it, but I do not think you can change it. You can certainly reload the Configuration class during runtime and create a new SessionFactory. So you could potentially change the mapping files/create new ones then keep ...

52. Hibernate Architecture Questions    forum.hibernate.org

Hi All, Investigating using Hibernate3 for new project, but whilst I'm quite happy with the gerenal development the TDA has raised a few questions that have me a bit stumpted. Points will be awarded for answers ;) Question 1... (think the answer must be no but would welcome any input ;) Can Hibernate be statically analysed to determine what SQL will ...

53. Patterns for Swing 3 thier architecture    forum.hibernate.org

Hello, Someone can point to some patterns to use for a 3 thier architecture using Swing+ Remoting + Hibernate... One of the biggest problems that I see is how to manage the Lazy loading... There's a better way that to imitate web patterns? Because in Swing the client it's a more rich one... Cheers,

54. MULTI-TENANT DATA ARCHITECTURE WITH HIBERNATE    forum.hibernate.org

There are basically three approaches to managing Muti-Tenant Data based on the isolation level needed: - Separated Databases - Separated Schemas - Shared Schema The decision about using one of these 3 approaches is based on the expected number of tenants, database sizer per tenant, number of user per tenant, value-added services per tenant. Ive been searching for ways to implement ...