persistence

What is the best scala-like persistence framework available right now?

What is the best scala-like persistence framework available right now? Hibernate works, but it's not very scala-like. It insists on using annotations, no-arg constructors, doesn't work with anonymous class instances, doesn't work with scala collections, has an outdated string-based query model, etc. I'm looking for something that reall...

I am unsure of how to access a persistence entity from a JSP page?

Hi, I am just learning Java EE, I have created a Persistence entity for a User object, which is stored in the database. I am now trying to create a JSP page that will allow a client to enter a new User object into the System. I am unsure of how the JSP page interacts with the User facade, the tutorials are confusing me a little. This i...

Persistance Queue Implementation

I was reading an article on Batch Processing in java over at JDJ http://java.sys-con.com/node/415321 . The article mentioned using a persistence queue as a Batch Updater instead of immediately sending an individual insert or update to the database. The author doesn't give a concrete example of this concept so I googled Persistence Queue ...

Unit Testing & Fake Repository implementation with cascading CRUD operations

Hi, i'm having trouble writing integration tests which use a fake repository, For example : Suppose I have a classroom entity, which aggregates students... var classroom = new Classroom(); classroom.Students.Add(new Student("Adam")); _fakeRepository.Save(classroom); _fakeRepostiory.GetAll<Student>().Where((student) => student.Name ==...

Public class: Makes pointer from integer without cast

I have written a class to help save and load data for the sake of persistence for my iPhone application but I have a problem with some NSUIntegers that I'm passing across. Basically, I have the code to use pointers, but eventually it has to start out being an actual value right? So I get this error warning: passing argument 1 of 'getSa...

Oracle thin driver vs. OCI driver. Pros and Cons?

Hi, When you develop a Java application that talks to oracle DBs, there are 2 options right? One is oracle thin driver, and the other is OCI driver that requires its own installation (please correct if I'm misunderstanding). Now, what are the pros and cons? Obviously thin driver sounds much better in terms of installation, but is the...

How can I persist a large Perl object for re-use between runs?

I've got a large XML file, which takes over 40 seconds to parse with XML::Simple. I'd like to be able to cache the resulting parsed object so that on the next run I can just retrieve the parsed object and not reparse the whole file. I've looked at using Data::Dumper but the documentation is a bit lacking on how to store and retrieve it...

netbeans + hibernate for java swing application

Hi all, im developing a java swing app and i would use hibernate for persistance. Im totally new in jpa, hibernate and ORM in general. Im follow this tutorial, its easy but the problem is the java class that descrive a table in db are made from the table with reverse enginering. I want do the opposite process: i want make db table from...

Making Java Swing applications persistent

I'd like to add persistence to my Swing-based application; and this is the first time that I'm doing something like that. I know how to use Java serialization APIs (though I'm using xstream instead), I know that JComponent's are serializable, but I'm interested in more architectural considerations: how an application should be designed ...

Use of Java constructors in persistent entities

Hello I'm new to JPA and using persistence in Java anyway and I have two questions I can't quite work out: I have generated tags as: @JoinColumn(name = "UserName", referencedColumnName = "UserName") @ManyToOne(optional = false) private User userName; @JoinColumn(name = "DatasetNo", referencedColumnName = "DatasetNo") @ManyToOne(optiona...

Persistent memcached connection with Apache and CodeIgniter

I have a CodeIgniter project. I want to use Memcache, but I don't want to create a new connection every time index.php is loaded (which is on every page load). How can I set up Apache / CodeIgniter so that I always have access to a memcache connection, without having to re-establish it all the time? ...

MyEntity.findAllByNameNotLike('bad%')

I'm attempting to pull up all entities that have a name that doesn't partially match a given string. MyEntity.findAllByNameNotLike('bad%') This gives me the following error: No such property: nameNot for class: MyEntity Possible solutions: name" type="groovy.lang.MissingPropertyException"> I had a quick look at the criteria st...

DuplicateKeyException alternative for javax.persistence

Hi. Is there something like of DuplicateKeyException applicable to javax.persistence.*? I've found this exception for ejb lib only: DuplicateKeyException Thank you. ...

OpenJPA HSQLdb - how to handle IDs

Hi! I'm having trouble handling IDs of my databse tables using OpenJPA and HSQLdb. I created an Abstract class where I handle annotations and stuff to remap into the DB: // Property accessors @Id @Column(name = "IDTESTOBJEKT", unique = true, nullable = false) public Integer getIdtestobjekt() { return this.idtestobje...

Persistence based on priority??

I have a monitoring application which via gui displays that status of a number of application servers. It works by sending a status request to the app server. The app server in turns queries the status of all it components, builds up a status response message and sends that message to the monitoring app. The monitoring app writes informa...

Best practice: How to persist simple data without a database in django?

I'm building a website that doesn't require a database because a REST API "is the database". (Except you don't want to be putting site-specific things in there, since the API is used by mostly mobile clients) However there's a few things that normally would be put in a database, for example the "jobs" page. You have master list view, an...

"Executing an update/delete query" exception for @NamedQuery doing REMOVE

Hi. The following exception thrown for Spring Batch application: 19:12:40,083 ERROR main AbstractStep:213 - Encountered an error executing the step javax.persistence.TransactionRequiredException: Executing an update/delete query Code,where named query used: entityManagerFactory.createEntityManager() .createNamedQu...

How do i search for words in my text column? mysql?

Hello, I have a column in my table which is of type text. The user may type any combination of words , it should appear in the result. Eg. Suppose string is :- Addicted to stackoverflow And suppose user types addicted and stackoverflow, then also results should appear. In other words, it is not a simple like operator through which we ...

Can't wrap my head around appengine data store persistence

Hi, I've run into the "can't operate on multiple entity groups in a single transaction." problem when using APPENGINE FOR JAVA w/ JDO with the following code: PersistenceManager pm = PMF.get().getPersistenceManager(); Query q = pm.newQuery("SELECT this FROM " + TypeA.class.getName() + " WHERE userId == userIdParam "); q.declarePa...

Difference between FetchType LAZY and EAGER in Java persistence?

Hi I am a newbie to Java persistence and Hibernate. What is the difference between FetchType LAZY and EAGER in Java persistence? Thanks ...