1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.page.impl;
18
19 import java.util.Collection;
20 import java.util.List;
21
22 import org.apache.commons.logging.Log;
23 import org.apache.commons.logging.LogFactory;
24 import org.apache.ojb.broker.util.collections.RemovalAwareCollection;
25 import org.apache.ojb.broker.util.collections.RemovalAwareList;
26
27
28 /***
29 * DatabasePageManagerUtils
30 *
31 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
32 * @version $Id: $
33 */
34 public class DatabasePageManagerUtils
35 {
36 protected static Log log = LogFactory.getLog(DatabasePageManagerUtils.class);
37
38 /***
39 * OJB 1.0.3 requires collections to be removal aware.
40 * Thus we can't seem to get away with just creating ArrayLists
41 * This issue on occurs when persisting newly create object collections
42 * When persisting objects retrieved with OJB, this issue does not occur
43 *
44 * @see JS2-590
45 * @return
46 */
47 public static final Collection createCollection()
48 {
49 return java.util.Collections.synchronizedCollection(new RemovalAwareCollection());
50 }
51
52 public static final List createList()
53 {
54 return java.util.Collections.synchronizedList(new RemovalAwareList());
55 }
56
57 }