Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 75308 Details for
Bug 198779
Java HotSpot Error in libjava.so Java_java_lang_Class_forName0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Java file again, without references to my project
NoLockFund.java (text/x-java), 4.95 KB, created by
Tilmann Zaeschke
on 2007-08-03 05:05:02 EDT
(
hide
)
Description:
Java file again, without references to my project
Filename:
MIME Type:
Creator:
Tilmann Zaeschke
Created:
2007-08-03 05:05:02 EDT
Size:
4.95 KB
patch
obsolete
>package vql7; > >import java.util.Properties; > >import com.versant.fund.Constants; >import com.versant.fund.FundQuery; >import com.versant.fund.FundQueryResult; >import com.versant.fund.Handle; >import com.versant.fund.HandleVector; >import com.versant.fund.QueryExecutionOptions; >import com.versant.trans.TransSession; >import com.versant.util.VVector; > >/** > * Reproduces that the query keeps an IRLOCK on the class object. > * > * @author Tilmann Zaeschke > * > */ >public class NoLockFund { > > > > > private static String _database; > private static Class _class = VVector.class; >// private static Class _class = ObservationRequestImpl.class; >// private final List<Handle[]> _batches = new LinkedList<Handle[]>(); > > /** > * @param args > * @throws InterruptedException > */ > public static void main(String[] args) throws InterruptedException { > _database = args[0]; > >// System.out.print("Populating... "); >// populate(); > System.out.println(" Done."); > run(); > } > >// private static void populate() { >// try { >// DBUtil.dropClassSchema(_database, _class); >// } catch (VException e) { >// System.out.println("ERROR: " + e.getMessage()); >// //ignore >// } >// DBUtil.defineClassSchema(_database, _class); >// >// TransSession tx = null; >// try { >// tx = new TransSession(_database); >// Constructor c = _class.getDeclaredConstructor(); >// c.setAccessible(true); >// for (int i = 0; i < 20000; i ++) { >// Object o = c.newInstance(); >// tx.makePersistent(o); >// } >// tx.commit(); >// } catch (SecurityException e) { >// // TODO Auto-generated catch block >// e.printStackTrace(); >// } catch (NoSuchMethodException e) { >// // TODO Auto-generated catch block >// e.printStackTrace(); >// } catch (IllegalArgumentException e) { >// // TODO Auto-generated catch block >// e.printStackTrace(); >// } catch (InstantiationException e) { >// // TODO Auto-generated catch block >// e.printStackTrace(); >// } catch (IllegalAccessException e) { >// // TODO Auto-generated catch block >// e.printStackTrace(); >// } catch (InvocationTargetException e) { >// // TODO Auto-generated catch block >// e.printStackTrace(); >// } finally { >// if (tx != null) { >// tx.endSession(); >// } >// } >// } > > private static void run() throws InterruptedException { > TransSession tx = null; > try { > Properties dbProp = new Properties(); > dbProp.put("database", _database); > dbProp.put("options", Constants.OPT_LK + ""); > dbProp.put("lockmode", Constants.NOLOCK + ""); > tx = new TransSession(dbProp); > QueryExecutionOptions opts = new QueryExecutionOptions(); > opts.setFetchObjects(false); > opts.setFlushAll(false); > opts.setFlushNone(true); > opts.setPinObjects(false); > > //FundQuery query = new FundQuery(tx, "select selfoid from " + NoLockFund.class.getName()); > FundQuery query = new FundQuery(tx, "select selfoid from " + _class.getName()); > query.setClassLockMode(Constants.NOLOCK); > query.setInstanceLockMode(Constants.NOLOCK); > query.setFetchSize(1000); > tx.setThreadOptions(Constants.DROP_RLOCK); > FundQueryResult r = query.execute(opts); > Handle[] ha = null; > Object[] batch = null; > int n = 0; > while ((ha = r.next(1000)) != null && ha.length > 0) { > batch = loadHA(ha, tx); > for (Object o: batch) { > o.hashCode(); > n++; > } > System.out.print('.'); > if (n >= 30000) { > return; > } > } >// Object o = null; >// while ((o = r.next()) != null) { >// o.hashCode(); >// n++; >// if (n % 1000 == 0) System.out.print('.'); >// } >//TODO r.close(); > query.close(); > System.out.println("FOUND: " + n); >// System.out.println("Waiting:"); >// Thread.sleep(10000); > } finally { > if (tx != null) { > tx.endSession(); > } > } > } > > private static Object[] loadHA(Handle[] ha, TransSession tx) { > HandleVector hv = tx.newHandleVector(ha); > hv.groupReadObjects(tx.database(), 0, Constants.NOLOCK); > Object[] b = new Object[hv.size()]; > for (int i = 0; i < b.length; i++) { > b[i] = hv.handleAt(i).handleToObject(); >// b[i] = tx.handleToObject(hv.handleAt(i)); > } > return b; > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 198779
:
75302
|
75303
|
75304
|
75305
| 75308 |
75309
|
75310
|
75311
|
94526