A maven JEE project using JSF, JPA (EclipseLink 2.3) is using MySQL comminity edition as the database. With the size of the database exceeding 20GB, there are database related peformance issues. As a solution, I am going to use ObjectDB.
I am doing to use two persistence units for each database and migrate objects. Will it work? If not, is there any other recommendation? I tired the web to search, but could not find any totorial explaining how to do it ?
Related
I would like to migrate to Eclipse link and JPA 2.1 on IBM WAS server and DB2. Could you please advice the sets need to be followed? If anyone used before, please explain to us what are the things to have cared?
I am going through the document - https://developer.ibm.com/wasdev/docs/can-i-use-jpa-2-1-on-websphere-application-server/
If you want JPA 2.1 I'd strongly suggest to migrate to WebSphere Liberty (preferably) , as it fully supports that and you already have license for that if you have WAS 8.5, or migrate to tWAS 9.0. On WAS 8.5.x you will have to disable JPA scanning, use application-managed persistence, create shared liberary.... not really worth.
In addition to server settings changes you will have to migrate your app from OpenJPA to EclipseLink. There is free Eclipse plugin - WebSphere_Application_Server_Migration_Toolkit that you can configure to scan your application sources for OpenJPA -> EclipseLink migration.
But also for WAS 8.5.x -> WebSphere Liberty migration ;-)
Actually I want to use Joda-Time to store dates in my database (Postgresql) like it's described in this thread or this one. I use JSF running on Glassfish (3.1.2.2). My problem is, I don't know how to use the converter for EclipseLink. EclipseLink is already shipped and bundled in Glassfish.
How can I access eclipseLink from my IDE (Netbeans)?
Any other suggestions? thanks.
I have searched. I can't find the exact way that matches what I have. I installed Eclipse for Java EE. I then went to help and install new software. Put in the jboss url, downloaded the Hibernate libraries. Everything went fine. I also installed the JDBC driver for MySQL. I tested it. It works. Downloaded and installed slf4j because I read someone that said to (hey, I'm learning).
I started a new Java EE project, and uh, I'm kind of stuck after that. It's a "Hello World" at the moment.
I can't find out what to do. I've seen tutorials where it says create a Hibernate project, but what if I want to add it later after I start a "normal" project? I don't want to manually look for the Hibernate.jar in the download folder. I installed it and want to know how to get to it.
I also saw lots of things that said JPA and Hibernate. Are they the same thing?
EDIT: I was able to find Hibernate by right clicking on the project, new, scroll down to hibernate. I am still interested in JPA and Hibernate.
JPA stands for "Java Persistence API", and it is a specification. It basically defines the APIs and behaviors of a persistence layer, and there are different implementations of the JPA specification. Hibernate is one of these implementations. There are a few others, e.g.:
http://www.oracle.com/technetwork/middleware/toplink/overview/index.html
http://openjpa.apache.org/
The JPA specification can be found here:
http://jcp.org/aboutJava/communityprocess/final/jsr317/index.html
I"m trying to create a Java EE project using a mongo database. I am unable to find any good working examples.How do you correctly set up JPA for the project?
Java EE 6 (or in JPA 2.0 as an part of it) does not have any defined support for MongoDB or for NoSQL databases in general.
That's why how it is done depends fully from JPA provider implementation. If you use EclipseLink, maybe you can try to follow example given in this blog post and present further questions about what exactly is not working.
Hey you should at least check out Arun Gupta's blog post on this at https://blogs.oracle.com/arungupta/entry/java_ee_6_and_nosql. Gupta is the Oracle Java EE Evangelist and this entry covers using EclipseLink for a JPA connection to MongoDB and deploying to Glassfish. If you search his blog, there is also an earlier entry on how to use the Java driver included with MongoDB in a Java EE project. I haven't tried the example with an EntityManager but am thinking about doing so.
I'm new to java, hibernate, spring roo and spring mvc.
I'm using Hibernate annotations and POJO classes.
My IDE is Spring Source (based on Eclipse)
What hibernate query editor do you suggest for testing hibernate queries?
I've tried installing jboss hibernate tools for eclipse, but had no success in configuration.
When I try to browse Database, I'm getting this error
An internal error occurred during:
"Fetching children of Database".
org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
I've tried to configure maven to use older version slf4j (1.5.8) but that didn't resolved the issue.
I've found recommendation for HQE editor,
but it's not available https://hqe.dev.java.net (Not found)
What is the easiest way to try Hibernate Queries? What tool do you suggest?
I am not sure why we need query editor for hibernate. Since the idea of hibernate was to make sure normal java developers can write query without sql knowledge.
When I developed hql, I used to just create join using java objects in eclipse. and then copy that to the query. And run the application to see if the query is fetching desired result. This method is tiresome, but still you don't write much of queries in hibernate, and also you will get used to syntax with just few queries.
And usually you will fetch by lazy loading and never use hql.
Still if you have a better way, I will check this blog.
Try Squirrel. It can do queries using hibernate.