persistence

WF4 Workflow under AppFabric not resuming properly after IISreset

北战南征 提交于 2019-12-11 05:58:18
问题 Folks, I've been having some trouble with a WF4 problem. I'm modeling a batch engine/work scheduler after Ron Jacobs' demo in his endpoint.tv webcast (http://archive.msdn.microsoft.com/wf4BatchJob). In his example, the "work branch" just counts inside a while loop. For my sample, I send a message to another workflow called SampleEngine.xamlx which does the counting. Every count, this workflow calls back to the parent (JobScheduler.xamlx) and reports progress completed. This works perfectly

Is it possible to store an NSMutableArray together with all its contents into a file and restore it later from there?

偶尔善良 提交于 2019-12-11 05:35:20
问题 Some kind of serialization available in iPhone OS? Is that practically possible or should I quickly forget about that? I am making a tiny app that stores some inputs in an NSMutableArray. When the user leaves, the inputs should stay alive until he/she returns to continue adding or removing stuff to/from that array. When the app quits, there must be some way to store all the stuff in the array in a file. Or must I iterate over it, rip everything out and write it i.e. comma-separated somewhere,

Evicted object still issues updates to the database in Hibernate

 ̄綄美尐妖づ 提交于 2019-12-11 03:45:12
问题 I have a problem where I evict an entity, but changes made to it will still change the database. This is part of the method in my DAO. @Entity public class Profile { @Id @GeneratedValue private Long id; @OneToMany(cascade = CascadeType.ALL) @JoinColumn(name = "PROFILE_ID") @LazyCollection(LazyCollectionOption.FALSE) private List<Avatar> avatars; ... } In a DAO method: Profile profile = getProfile(...); // Clear from hibernate currentSession.evict(profile); profile.setId(null); for (Avatar a :

iOS: Saving a double picker's settings (data persistence)

馋奶兔 提交于 2019-12-11 03:40:01
问题 So I have a double picker where the user sets each wheel to what they want, and then press a button which will display their choice. Easy clean and simple, but I want to store that data for later so that it does not disappear after they close the app and re-open it again. Now, I know how to do it with a datePicker, but not a doublePicker. So my question is how do I tweak my code from saving and retrieving a datePickers info into a doublePicker? Here is my code for the datePicker:

Hibernate Weblogic 10.3.4 java.lang.NoSuchMethodError: javax/persistence/spi/PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;

筅森魡賤 提交于 2019-12-11 03:38:58
问题 I'm running a weblogic 10.3.4 (Yes I know it a legacy version, but I'm not the one dictating the version...) on a Ubuntu 12.04 LTS. When deploying a JPA (hibernate) webapp on the server I get java.lang.NoSuchMethodError: javax/persistence/spi/PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode; at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:629) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java

What could cause a failure in PHP serialize function?

我们两清 提交于 2019-12-11 03:30:12
问题 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 down a simple string that can go into a database field. The code looks like this: $serializedDataObject = base64_encode(serialize($objectInstance-

How can I persist a highlighted selection using Javascript?

删除回忆录丶 提交于 2019-12-11 03:13:19
问题 I want to highlight a selection of text on a web page. I have gone through this solution suggested by Tim Down which does half the job for me. Now I need a way to highlight the text permanently. By permanently, I mean when I highlight some text, close the browser then re-open the page from local, the text should remain highlighted. Tim's solution keeps the text highlighted as long as I don't refresh or close the page. I guess I need to save the range's start and end offset somewhere so that

JPA: How to map a Map with Date as key

*爱你&永不变心* 提交于 2019-12-11 02:16:32
问题 Normally you'd map a Date as @Temporal(TemporalType.DATE) and you'd map a Map<> as @ManyToMany or @Lob . Now I am trying to map a Map. I have tried @ManyToMany @Temporal(TemporalType.DATE) but this doesn't seem to work: Exception Description: The type [class java.util.Map] for the attribute [x] on the entity class [y] is not a valid type for a temporal mapping. So my question is, how to map a Map containing a Date? 回答1: Have you tried something like this? @OneToMany @MapKeyTemporal(DATE)

declare a transaction in ejb 3.0

这一生的挚爱 提交于 2019-12-11 01:39:44
问题 how can I force the EJB to not flush everything after every single command, I want to do a transaction. I've read that this is done somehow declaratively. But how exactly? @Stateless public class SomeBean{ @PersistenceContext EntityManager em; public void doSomeStuffAndThenFlushToTheDb(){ em.persist(entity); // it's flushed by now, I don't want that em.persist(somethingElse); // now I want to flush both em.flush(); } } 回答1: Hi, how can I force the EJB to not flush everything after every

How can I have DBIC persistent database connection in mod_perl?

假装没事ソ 提交于 2019-12-11 01:27:51
问题 I am using mod_perl for my web application. Currently, I plan to use a mysql database across the network. In every CGI request to display_customer_transaction.cgi, my script will Open up database connection across network Perform query on the database using SQL statement Analysis the data retrieved from database Print out the data in HTML format Close the database connection After some profiling, I realize step (1) is the bottleneck. Hence, I wish to avoid opening and closing a database