Swing « Development « JPA Q&A





1. Hibernate + Swing    stackoverflow.com

What's the best practice?

  • A single session for the whole app
  • A session per window
  • A session per thread, and detaching everything at random
  • Something else?
I've googled around, and there's no consensus. Everyone says something, ...

2. jComboBox giving org.hibernate.PropertyAccessException error    stackoverflow.com

There is 2 jComboBox .. and 2 Class . When form load event it will fill jComboBox1,when ActionEvent fired it will load another class with selection of the jComboBox1.I wanna get ...

3. good practices and bad practices    stackoverflow.com

i have some questions about interaction with hibernate.

  1. openSession or getCurrentSession (without jta, thread insted)?
  2. How mix session operations with swing gui? Is good have something like this in a javabean class?
    public ...

4. What is a good strategy for seprating layers for an appication that can be used online and offline?    stackoverflow.com

I have a Java web application that has a 'disconnected' Java Swing desktop app. Using the desktop app users connect to the internet and download data they need from a ...

5. Java JPA one to many    stackoverflow.com

I had recently posted someone about populating a JTable, which is now fully functional. How ever, I am stuck over something else now, I'm hoping to achieve two specific thigns with this ...

6. JComboBox + JPA    stackoverflow.com

Greetings fellow humans, or those in disguise, I am currently stuck on a Java issue considering the java persistance API and JComboBox. The issue is as followed: I have a JDialog, whom I use ...

7. Hibernate first start Make application slow    stackoverflow.com

I use Hibernate for my desktop swing applications.The first database access makes the application slow,not responding.I think it is because the hibernate's libraries takes time to load.This problem occurs specially at ...

8. Hibernate + Swing Is possible?????    coderanch.com

Well, that's a matter of opinion. However, if you're working with Swing, Netbeans 5.0 can't be beat - not even close. The matisse layout in NB 5.0 is amazing...it makes Swing fun. However, there is no official "support" for Hibernate in Netbeans...but really we're just talking about a couple of libraries and some XML config files...it's not like Netbeans doesn't handle ...

9. Can we combine hibernate with swing based application?    coderanch.com

Hello, I am currently working on web based application and used hibernate and found its criteria queries feature very much useful. Now I want to use hibernate with Swing based application also. My question is: How a swing based application will read hibernate.cfg.xml file? Waiting for the help from you all. Tapan Maru





12. Problems: Swing and Hibernate    forum.hibernate.org

@Entity @Table(name="tb_banco") public class BancoBean implements Serializable{ /** Declaraes **/ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "bc_id", nullable=false) private Integer bcId; @Column(name = "bc_banco", length=50) private String bcBanco; @Column(name = "bc_agencia", length=4) private Integer bcAgencia; @Column(name = "bc_num_conta", length=5) private Integer bcNumConta; @OneToMany(mappedBy = "cxBanco") private Collection tbCaixaCollection; // getters and setters

13. two tiered swing application    forum.hibernate.org

Two tiered architecture to me implies the client has direct access to the database. Thus the architecture is simple as you access the hibernate session directly within the swing client. Each client would be installed with the Hibernate jars, mappings (+ other required libs). The example use is no different than the many examples that already exist as there are no ...

14. Help: Hibernate and Swing    forum.hibernate.org

I'm trying to build a small Swing application to learn Hibernate, but all samples I found in the web are related to Hibernate use with web applications. So I need some guidelines to move forward. I understand that I need a static SessionFactory, but what about Session ? I had a look at the code provided by nvolpini in the page: ...

15. Questions about Hibernate in Swing environment    forum.hibernate.org

I have a question. We're writing Swing applications for data manipulation. We have a central "PersistenceManager", a wrapper round our current persistence layer (VBSF), that is being used throughout our program. Code: public interface IPersistenceManager { public Connection getConnection() throws PersistenceException; public Object getId(Object obj) throws NullPointerException, PersistenceException; public Iterator iterate(Class type) throws PersistenceException, NullPointerException; ...





17. Hibernate with Swing application    forum.hibernate.org

Most of the examples and documentation for Hibernate reflects the primary usage of Hibernate: web applications. We have another goal - to create a Swing (or SWT) application which uses Hibernate as an abstraction/persistence layer between the GUI and the database. We need this to run client/server. We are very familiar with Apple's Webobjects/EOF which allows you to fairly neatly separate ...

18. Swing/Hibernate sample code    forum.hibernate.org

Thank you for the response about Hibernate and Swing. So when do I start a Session? Any event-loop-run which causes painting of the screen or which changes the object model might need access to the DB. I want to choose a correct Session scope as described in http://www.hibernate.org/168.html , so I don't want to simply let the Session stay open. Quote: ...

19. Swing and Hibernate    forum.hibernate.org

One of the developers on my team came up with an idea for our Swing application (in which there is a single DB updated only by the one app, which means fewer data consistency issues). Open a Session at the beginning of each write-Action and leave it open until the beginning of the next write-Action. Read-only data accesses such as, scrolling ...

20. Hibernate in Swing Application (username, password)    forum.hibernate.org

Hibernate version: 2.1.6 Name and version of the database you are using: MySQL I have written a swing application that uses hibernate to connect to a MySQL database. The application is used to interface with a database that powers a web application and automatically prints things. The application is loaded via Java WebStart. My question is about the hibernate mapping file. ...

21. ClassNotFoundException in client (swing) application    forum.hibernate.org

Hi, I am having with my swing application which calls EJB method on the server side and ejb loads object using hibernate. There are two maps in the object and each of them are mapped with the property lazy="false" When fetching object from the server I get this error in the client side: Code: Caused by: java.lang.ClassNotFoundException: org.hibernate.collection.PersistentMap ...

23. Hibernate & Swing    forum.hibernate.org

busy forum... We would like to have a somewhat thin client (alternative to not packaging hibernate specific code into each swing application). Is putting hibernate on the iseries, and using something like RMI to allow clients to communicate a viable solution? If so, does anyone know what steps are needed to accomplish something this. Any tutorials on setting up hibernate on ...

24. Hibernate Classes needed on fat(Swing) Client?!    forum.hibernate.org

Hi, we have a fat (Swing-)Client that connects to a JBoss that runs ejb3-persistent beans. As all Collections we send to the client (finderResults, but also mapped relations) are Hibernate-Collections, we have to distribute the Hibernate-Classes to the Client - is there a way around that, eg. is it possible to have a fetch.type=eager and have plain java-collections for mappings instead ...

25. Process-scoped identity for a Swing application    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.05 Name and version of the database you are using: MySQL 4.1.16 We're about to set up persistence for a 2-tier Swing application that uses Hibernate to read and write from a MySQL database. This is a multi-user system, so we will need to heavily rely on versioning and ...

26. Swing and Hibernate Configuration    forum.hibernate.org

27. Im trying to build a Swing application    forum.hibernate.org

28. Using Hibernate in desktop app w/ Swing GUI    forum.hibernate.org

I realize that Swing is a presentation framework and Hibernate is an ORM technology for simplifying the data layer. I realize that the two have little to do with each other. Still I have a question that I can't find a straightforward answer to. I need to render an object, say a Thing object. When the user clicks on the visual ...

29. Hibernate in (Swing) standalone application    forum.hibernate.org

30. Swing + hibernate is it possible?    forum.hibernate.org

Hi, Is it possible to have swing + hibernate combination? I am trying to develop one small standalone application, in which my client tier will be in swing and middle tier will be hibernate and model tier is oracle database. If it is possbile from where can I get the document about that? Please do the needful. Thanks Sohan Soni India ...

31. Swing-based Application Architcture    forum.hibernate.org

We are developing a Swing-based application launched via WebStart and we would like to use Hibernate on the client side. I know this sort of architecture has been discussed here before, but I have somewhat different needs than those before me. We are going to use VJDBC ( http://vjdbc.sourceforge.net/ ) on the client side to connect to our database (the JDBC ...

32. Hibernate and swing    forum.hibernate.org

33. Hibernate and Swing would it work?    forum.hibernate.org

Hello: I am doing research on combining Swing and Hibernate in a Java desktop app. My requirement is very simple, we have a database with about 30 tables and I need to create CRUD (Create, Read, Update and Delete) forms ASAP. I have experience doing SWING to JDBC using hand coded SQL statements and I have some experience using Hibernate in ...

35. unique object references in a multi threaded swing gui    forum.hibernate.org

i am building a hibernmate application basted on swing. now i want, that all my objects, loaded by hibernate, are unique in the application. explaining: a search gui-component is generating hibernate objects and distributing them to the thole application. from a secound search, i must have the same objects, when they are already in other gui components. so i can register ...

36. Random LazyInitializationException in Swing App    forum.hibernate.org

Hibernate version: 3.3.1 Java version: jre 1.6_0_11 Database: PostgreSQL 8.1 I have a production Swing app with 20 users. I use a "main" session that remains open for the life of the app. I manage the session by clearing it at the appropriate times. Intermittently, a "LazyInitializationException - cannot initialize proxy - No session" will be thrown when hibernate attempts to ...

37. Hibernate & Swing: Can calls return the SAME instance?    forum.hibernate.org

A newbie question. Any way to get subsequent calls to Hibernate to return the SAME object, not its equals()? I am developing a Swing app. I want to use Hibernate to fetch/persist my (non-visual) Java Beans, such as Person for example; instead, it creates (in memory) multiple versions of identical Java Beans (multiple Persons with the same id). This is problematic ...

38. Is it Possible to Combine Hibernate + Swing?????    forums.oracle.com

Honestly, I'm glad you disagree, because I'd love to see a way for them to work better. We're working on a multi-user 2-tier Hibernate/Swing application right now and running into many difficulties getting it to work smoothly. If you can show me how to solve some of our problems, I'll be happily singing a different tune.

39. Hibernate with Swing    forums.oracle.com

I guess you never heared of Spring Framework either! Basically Spring Framework is used for the web, while SpringRC is used for Desktop Applications! .. a google search on this will yield a lot of answers Hibernate .. well I am no expert on it either. However it is failty simple to understand. Basically you can save POJO (Plane old Java ...