Hi, I am trying to write a plugin to automatically make objects from sample -> rawbioassay. however, after you call dc.commit() it closes the connection. what is the normal way to re-establish a connection? dc.reconnect() does not seem to work. getting a new dc via dc = sc.newDbControl(); does not seem to work either.
i need to commit the created objects between steps because subsequent objects do database lookups of previous objects to create themselves. here is my general outline. ArraySlide slide; for (Sample sourceObj : sources) { dc.reattachItem(sourceObj); /** * 1. get the slide */ slideName = sourceObj.getName().split(" ")[0]; slide = getSlideByName(dc, slideName); /** * 2. make chromatin input sample from pooled sample */ Sample chromatinSample = getChromatinSample(dc, sourceObj); Extract chromatinExtract = addExtract(dc, chromatinSample); /** * 3. make the extract from the pooled sample */ Extract pooledExtract = addExtract(dc, sourceObj); dc.commit(); dc = sc.newDbControl(); /** * 4. make the labelled extracts from extracts */ LabeledExtract chromatinLabeledExtract = addLabeledExtract(dc, inputLabel, chromatinExtract); LabeledExtract pooledLabeledExtract = addLabeledExtract(dc, poolLabel, pooledExtract); dc.commit(); dc = sc.newDbControl(); /** * 5. make the hybridization from the matched pairs, add the slide */ Hybridization hyb = addHybridization(dc, chromatinLabeledExtract, pooledLabeledExtract, slide); dc.commit(); dc = sc.newDbControl(); /** * 6. make the scan */ Scan scan = addScan(dc, hyb); dc.commit(); dc = sc.newDbControl(); /** * 7. make the rawbioassay */ String datatype = "GenePix"; RawBioAssay myRawBioAssay = addRawBioAssay(dc, scan, RawDataTypes.getRawDataType(datatype) ); dc.commit(); dc = sc.newDbControl(); // group into experiment ? fileNames = fileNames + " " + myRawBioAssay.getName(); } -- Keith Ching, Ph.D. Bioinformatics, Laboratory of Gene Regulation Ludwig Institute for Cancer Research 9500 Gilman Drive, #0653 CMM East, Room 3020 La Jolla, CA 92093-0653 [EMAIL PROTECTED] 858-822-5767 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject "unsubscribe" to [EMAIL PROTECTED]