persistence

SQL persistence service

I am trying to run the code sample from Workflow Foundation which uses persistence service's functionality. In the code I've observed: Initial Catalog=SqlPersistenceService;Data Source=localhost;Integrated Security=SSPI; When I run the code I am getting an exception. How do I enable persistence services on my SQLEXPRESS server? ...

Workflow persistence - WebServiceInputActivity

Hi I have created the IAdder interface with two methods: PassA and PassB. My workflow starts with webServiceInputActivity1 which is activated by PassA remote call. Another element in my workflow is another webServiceInputActivity2 element. This time the "IsActivating" property is set to false. I expect my workflow to be persisted afte...

Converting from String to custom Object for Spring MVC form Data binding?

I am using Spring MVC's SimpleFormController in conjunction with Spring MVC's form JTL to create a form to edit a Generic object. On my form I have a drop down where the user can specify a server via a drop down. <form:form commandName="generic"> <form:select path="server"> <form:options items="${servers}" itemValue="id" it...

Domain Layer access to Persistence stuff

I am trying to keep my domain layer as "pure" as possible without weaving in persistence or other infrastructure concerns. However, there are times when my domain layer needs to use the services of either an RDBMS or other external dependency and I'm not sure how to deal with it. For example, each domain object in my app implements an ...

How do all these web platforms achieve a long-time login session that does not require the user to login over and over again?

I really don't get that: Some platforms have some kind of "persistent" login sessions. Like Stackoverflow and many other boards and platforms. I've logged in here a month ago. And even if I quit my browser totally and have another internet connection with different IP, I come back here with no login. I can't belief that's just done with...

hibernate auto join conditions

Hibernate persistence class: @Entity public class A { @OneToMany(mappedBy = "a") private Set<B> bSet = new HashSet<B>(); @Basic private boolean DELETED; } Class B also have a DELETED property. How can we process DELETED property during join automatically, for select only not deleted entities. May be with hel...

How to properly work _around_ Javascript persistence?

There is basic persistence of Javascript vars/etc. You call a function/method, and the next time you call that same function/method, it is holding the data from the last time. You can delete the vars when you are done with them, but that removes the advantage of using the code again for that instance. So what is the proper way to write...

How to persist the same JPA Entity at multiple databases (distributed system)?

(How) is it possible to persist a JPA Entity at the databases of multiple servers without copying everything to DTOs? We have a distributed system. Some applications do have DBs for caching purposes. The JPA Provider throws an Exception in which it complains that it cannot persist a detached object. But I would like to preserve the ID ...

.NET MVC and securely passing data between pages

a little background info first. I have been using Web Forms for most of my career and have recently become interested in .NET MVC. I realize that it is intended to be stateless, however, i dont understand how it is completely feasible. In a forms application, the user authenticates and I return a user ID and some roles which are then pla...

Java Persistence: Cast to something the result of Query.getResultList() ?

Hey everyone, I'm new to persistence / hibernate and I need your help. Here's the situation. I have a table that contains some stuff. Let's call them Persons. I'd like to get all the entries from the database that are in that table. I have a Person class that is a simple POJO with a property for each column in the table (name, age,..) ...

Lightweight persistent message queue for Linux?

Is there a (preferably no cost) message queuing solution for Linux that has disk-based persistence (e.g. can survive a reboot)? I'm looking for something equivalent to MSMQ on Windows, fairly basic and lightweight and not, say, MQSeries. This will be used from C++ components. ...

Handling creation of ORM objects prior to persistence/generation of primary keys?

Bear with me as I try to simplify my issue as much as possible. I am creating a new ORM object. This object has an auto generated primary key which is created on the database using as an identity. Within this object, is a child object with a many to one relationship with the parent object. One of the attributes I need to set to create t...

CoreData design pattern: persisting a single object of many -or-how many NSPessistentObjectContexts should I have?

I'm converting an app from SQLitePersistentObjects to CoreData. In the app, have a class that I generate many* instances of from an XML file retrieved from my server. The UI can trigger actions that will require me to save some* of those objects until the next invocation of the app. Other than having a single NSManagedObjectContext for...

Quick'n'dirty persistence

I often find myself needing a quick ( in terms of code ), lightweight ( in term of runtime, dependencies) persistence solution for simply a bunch of objects, mainly between application restarts. Usually I resort to some Java serialisation hack, but I wonder if there's something better out there. Have you used something similar? To ...

Maintaining Persistence When Using Rake Tasks

I'm running some basic continuous integration scripts in the form of rake tasks, using cron to automate their running. I'd like to be able to maintain some form of state between tasks however. I've considered just writing information to a file and reading it back in. Is there a more "ruby" way of doing this? ...

Why doesn't interceptor's onLoad() work?

We have a jboss based system persistance.xml looks like a following: <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/p...

Referential identity in persistence frameworks

With our current persistence framework properties on a child entity that point to it's parent always point to the same instance. For example, given the following entity classes public class Order { public int OrderId{get;set;} public EntityCollection<LineItem> Items{get;} } public class LineItem { public Order Order{ get;se...

What is the easiest way to persist maps/structs in Clojure?

The obvious way is to load up JDBC support from Clojure Contrib and write some function to translate a map/struct to a table. One drawback of this is that it isn't very flexible; changes to your structure will require DDL changes. This implies either writing DDL generation (tough) or hand-coding migrations (boring). What alternatives ex...

Windows Mobile - saving user data across application sessions

Hi I am creating an application where the user needs to log in to access data. I would like to save the user credentials when they first login and give a "Remember Me" option. Is there any class/interface implementation which I can use in my WinMo application in order to be able to do this? Or is SQL the only option available? Thanks....

How are persistent database connections stored in PHP?

As stated in the documentation on sqlite_popen php tries to make use of a persistent resource mechanism. Where is this mechanism described in detail? Is it possible to view all resources currently stored/used? Is it possible to access this mechanism and store/read other values? ...