Sessions are started via session_start(), I realize that much, but to make sessions persistent, they need an ID.
Now, the php.ini file has a setting:
session.use_cookies = 1
So I don't have to pass the ID around. But there's another setting:
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetim...
I am currently using memcached with my java app, and overall it's working great.
The features of memcached that are most important to me are:
it's fast, since reads and writes are in-memory and don't touch the disk
it's just a key/value store (since that's all my app needs)
it's distributed
it uses memory efficiently by having each ob...
Hi,
today I have coded a test case for my application, to see how transactions behave. And I have found that nothing works the way I thought it does.
I have a Spring-based application using Hibernate as JPA provider, backed by MySQL.
I have DAO objects, extending Spring's JpaDaoSupport. These are covered by Spring's transaction managem...
I have a launchd daemon that every so often uploads some data via a web service using NSOperationQueue.
I need to be able to persist this data, both so that it can later be re-uploaded in the event of failure, even between sessions (in case of computer shut down, for example).
This is not a high load application, it probably receives i...
I'm using java persistence to save a list of entities that are associated to another entity. Here's a quick rundown of where I'm having some problems.
@Entity public class Offer implements Serializable {
@Id private Long offerId;
@OneToMany
@Column List<OfferCategory> offerCategories;
}
@Entity public class OfferCategory implem...
I have some serverside PHP code that attempts persist a data object (essentially an multi-dimensional array) to a backend database. This data object originally comes in as AMF actionscript object sent from a flex application. I want persist the object in whole for later use so I have used the php serialize function and encode the object ...
Okay, I've used Hibernate in several projects now but I did not learn its intricacies before using it. I started with looking at codes that used JPA Annotations and integrated with Spring and everything worked well. But now that I want to teach basic Hibernate to my students and I'm in the process of creating an example and using the doc...
Hi,
Is there a way to map a calculated property using JPA?
Assuming I have an Invoice object with one or more InvoiceLineItems within it, I want to have a persistent calculated property on the Invoice class that gives me the total amount:
class Invoice {
...
@Column(name = "TOTAL_AMOUNT")
public BigDecimal getTotalAmount(...
Using hibernate, how can I persist a class with a List<String> field?
Consider the following entity class:
@Entity
public class Blog {
private Long id;
private List<String> list;
@Id
@GeneratedValue
public Long getId() { return id; }
public void setId(Long id) { this.id = id; }
public List<String> getList(...
I'm trying to add a new entity and then after a successful commit, redirect them to the list action.
Here's a summary of what I'm doing:
@Name("offerAction")
@Scope(ScopeType.CONVERSATION)
public class OfferAction implements Serializable {
@In private EntityManager entityManager;
private List<OfferSite> offerSites;
@Factory("off...
I'm trying to get my head round WF. I'm visualizing a State Machine Workflow with long-running workflows that will be stored in using the SQL persistence service.
A user may have more than one outstanding workflows assigned. I can't work out two things.
How do I get a list of all outstanding workflows?
How do I get a list of workflo...
I'm new to Workflow Foundation. I've worked my way through one book (K. Scott Allen's Programming Windows Workflow Foundation) which was okay but I'm left with several questions. The biggest one is 'where do I put the data'?
Throughout the book he uses the idea of a Bug Tracking system; the scenario isn't too far from what I want to d...
How do you manage versions of workflows in WF when you have long running workflows and you might have two or three versions in the persistence store at the same time and have to be able to access them all?
...
I'm implementing generic, persistent .NET collections based on top of the ESENT database engine (using the ManagedEsent interop layer). So far I have been focusing on classes that exactly mimic their System.Collections.Generic counterparts, except that they take a path in the constructor indicating where the database should go. Code like...
I have a one-to-many relationship modeled using an extra table:
create table t1 (id int primary key, name varchar(10) /*...*/);
create table t2 (id int primary key, name varchar(10) /*...*/);
create table t1_t2 (t1_id int, t2_id int, primary key (t1, t2));
The tables are supposed to model the relationship of one t1 to many t2. What is...
Data Access Objects (DAOs) are a common design pattern, and recommended by Sun. But the earliest examples of Java DAOs interacted directly with relational databases -- they were, in essence, doing object-relational mapping (ORM). Nowadays, I see DAOs on top of mature ORM frameworks like JDO and Hibernate, and I wonder if that is really a...
What is the difference between @Column and @Basic annotations in JPA? Can they be used together? Should they be used together? Or does one of them suffice?
...
I would like to get a reference to all objects in the Java heap, even if I don't immediately have a reference to those objects in my active thread. I don't need non-referenced objects (those "queued" for garbage collection), but would like to get anything that's still in use.
The goal is to serialize and store all the objects to implem...
When i follow restful project in netbeans then i get the error.
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle.toplink.essentials.PersistenceProvider
Caused by: java.lang.ClassNotFoundException: oracle.toplink.essential...
Hi!
I'd like to know if cocoa has a default way of storing data. If yes what is it? I mean like rails is by default using sqlite...
Also I'm searching for a tutorial on how to use it... Like get data and showing it into a listview, etc...
Thanks for your help!
...