[aiotrade~main:176] Fixed org.aiotrade.lib.util.ServiceConfigurationError: org.aiotrade.lib.c
- From: dcaoyuan@kenai.com
- To: commits@aiotrade.kenai.com
- Subject: [aiotrade~main:176] Fixed org.aiotrade.lib.util.ServiceConfigurationError: org.aiotrade.lib.c
- Date: Tue, 2 Feb 2010 13:09:44 +0000
Project: aiotrade
Repository: main
Revision: 176
Author: dcaoyuan
Date: 2010-02-02 13:08:53 UTC
Link:
Log Message:
------------
more icons
Did not use object pool
Fixed stack overflow
Fixed org.aiotrade.lib.util.ServiceConfigurationError:
org.aiotrade.lib.charting.descriptor.DrawingDescriptorActionFactory:
Revisions:
----------
173
174
175
176
Modified Paths:
---------------
suite/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame.gif
suite/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame32.gif
suite/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame48.gif
libs/lib.dataserver.ib/src/main/scala/org/aiotrade/lib/dataserver/ib/IBWrapper.scala
libs/lib.dataserver.yahoo/src/main/scala/org/aiotrade/lib/dataserver/yahoo/YahooQuoteServer.scala
libs/lib.math/src/main/scala/org/aiotrade/lib/math/timeseries/datasource/AbstractDataServer.scala
libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/Quote.scala
libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/dataserver/QuoteServer.scala
libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/dataserver/TickerServer.scala
libs/lib.charting/src/main/scala/org/aiotrade/lib/charting/view/PopupIndicatorChartView.scala
modules/modules.ui/src/main/resources/META-INF/services/org.aiotrade.lib.charting.descriptor.DrawingDescriptorActionFactory
Diffs:
------
diff -r a4d8e5f1a877 -r 0719ef0330c3
suite/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame.gif
Binary file
suite/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame.gif
has changed
diff -r a4d8e5f1a877 -r 0719ef0330c3
suite/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame32.gif
Binary file
suite/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame32.gif
has changed
diff -r a4d8e5f1a877 -r 0719ef0330c3
suite/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame48.gif
Binary file
suite/branding/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame48.gif
has changed
diff -r 0719ef0330c3 -r 5a13209248e2
libs/lib.dataserver.ib/src/main/scala/org/aiotrade/lib/dataserver/ib/IBWrapper.scala
---
a/libs/lib.dataserver.ib/src/main/scala/org/aiotrade/lib/dataserver/ib/IBWrapper.scala
Tue Feb 02 17:23:40 2010 +0800
+++
b/libs/lib.dataserver.ib/src/main/scala/org/aiotrade/lib/dataserver/ib/IBWrapper.scala
Tue Feb 02 20:47:04 2010 +0800
@@ -40,9 +40,7 @@
import org.aiotrade.lib.math.timeseries.datasource.DataContract
import org.aiotrade.lib.math.timeseries.datasource.DataServer
import org.aiotrade.lib.securities.Quote
-import org.aiotrade.lib.securities.QuotePool
import org.aiotrade.lib.securities.Security
-import org.aiotrade.lib.securities.TickerPool
import org.aiotrade.lib.securities.TickerSnapshot
import scala.collection.immutable.TreeMap
import scala.collection.mutable.ArrayBuffer
@@ -55,8 +53,6 @@
class IBWrapper extends EWrapperAdapter
object IBWrapper extends IBWrapper {
- private val quotePool = new QuotePool
- private val tickerPool = new TickerPool
private val TWS_DATE_FORMAT = new SimpleDateFormat("yyyyMMdd HH:mm:ss")
private val HISTORICAL_DATA_END = "finished"
@@ -114,7 +110,7 @@
}
}
- 1;
+ 1
}
def getSupportedFreqs: Array[TFreq] = {
@@ -308,7 +304,7 @@
date.toLong * 1000
} catch {case ex: NumberFormatException => return}
- val quote = quotePool.borrowObject
+ val quote = new Quote
quote.time = time
quote.open = open.toFloat
@@ -337,7 +333,7 @@
// received price tick
val snapshot = tickerSnapshotOf(tickerId)
if (snapshot == null) {
- return;
+ return
}
snapshot synchronized {
diff -r 0719ef0330c3 -r 5a13209248e2
libs/lib.dataserver.yahoo/src/main/scala/org/aiotrade/lib/dataserver/yahoo/YahooQuoteServer.scala
---
a/libs/lib.dataserver.yahoo/src/main/scala/org/aiotrade/lib/dataserver/yahoo/YahooQuoteServer.scala
Tue Feb 02 17:23:40 2010 +0800
+++
b/libs/lib.dataserver.yahoo/src/main/scala/org/aiotrade/lib/dataserver/yahoo/YahooQuoteServer.scala
Tue Feb 02 20:47:04 2010 +0800
@@ -38,7 +38,7 @@
import java.util.zip.GZIPInputStream
import javax.imageio.ImageIO
import org.aiotrade.lib.math.timeseries.TFreq
-import org.aiotrade.lib.securities.{Exchange}
+import org.aiotrade.lib.securities.{Exchange, Quote}
import org.aiotrade.lib.securities.dataserver.{QuoteContract, QuoteServer}
/**
@@ -191,7 +191,7 @@
// quote time is rounded to 00:00, we should adjust it to open
time
time += exchange.openTimeOfDay
- val quote = borrowQuote
+ val quote = new Quote
quote.time = time
quote.open = openX.trim.toFloat
@@ -203,7 +203,6 @@
quote.close_adj = adjCloseX.trim.toFloat
val newestTime1 = if (quote.high * quote.low * quote.close == 0)
{
- returnQuote(quote)
newestTime
} else {
storage += quote
@@ -216,7 +215,7 @@
}
}
- loop(-Long.MaxValue)
+ loop(Long.MinValue)
}
protected def loadFromSource(afterThisTime: Long): Long = {
diff -r 0719ef0330c3 -r 5a13209248e2
libs/lib.math/src/main/scala/org/aiotrade/lib/math/timeseries/datasource/AbstractDataServer.scala
---
a/libs/lib.math/src/main/scala/org/aiotrade/lib/math/timeseries/datasource/AbstractDataServer.scala
Tue Feb 02 17:23:40 2010 +0800
+++
b/libs/lib.math/src/main/scala/org/aiotrade/lib/math/timeseries/datasource/AbstractDataServer.scala
Tue Feb 02 20:47:04 2010 +0800
@@ -167,7 +167,6 @@
private def releaseStorage(contract: C): Unit = {
/** don't get storage via getStorage(contract), which will create a new
one if none */
for (storage <- contractToStorage.get(contract)) {
- returnBorrowedTimeValues(storage.toArray)
storage.synchronized {
storage.clear
}
@@ -177,8 +176,6 @@
}
}
- protected def returnBorrowedTimeValues(datas: Array[V])
-
protected def isAscending(values: Array[V]): Boolean = {
val size = values.length
if (size <= 1) {
@@ -301,8 +298,7 @@
postStopRefreshServer
}
- protected def postStopRefreshServer {
- }
+ protected def postStopRefreshServer {}
protected def loadFromPersistence: Long
diff -r 0719ef0330c3 -r 5a13209248e2
libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/Quote.scala
---
a/libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/Quote.scala
Tue Feb 02 17:23:40 2010 +0800
+++
b/libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/Quote.scala
Tue Feb 02 20:47:04 2010 +0800
@@ -79,6 +79,7 @@
var i = 0
while (i < values.length) {
values(i) = 0
+ i += 1
}
hasGaps = false
}
diff -r 0719ef0330c3 -r 5a13209248e2
libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/dataserver/QuoteServer.scala
---
a/libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/dataserver/QuoteServer.scala
Tue Feb 02 17:23:40 2010 +0800
+++
b/libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/dataserver/QuoteServer.scala
Tue Feb 02 20:47:04 2010 +0800
@@ -35,7 +35,7 @@
import org.aiotrade.lib.math.timeseries.TSerEvent
import org.aiotrade.lib.math.timeseries.datasource.AbstractDataServer
import org.aiotrade.lib.math.timeseries.{TSer}
-import org.aiotrade.lib.securities.{Exchange, Quote, QuotePool,
PersistenceManager}
+import org.aiotrade.lib.securities.{Exchange, Quote, PersistenceManager}
/**
* This class will load the quote datas from data source to its data
storage: quotes.
@@ -43,11 +43,6 @@
*
* @author Caoyuan Deng
*/
-object QuoteServer {
- protected val quotePool = new QuotePool
-}
-
-import QuoteServer._
abstract class QuoteServer extends AbstractDataServer[QuoteContract, Quote] {
actorActions += {
@@ -57,18 +52,6 @@
postRefresh
}
- protected def borrowQuote: Quote = {
- quotePool.borrowObject
- }
-
- protected def returnQuote(quote: Quote) {
- quotePool.returnObject(quote)
- }
-
- protected def returnBorrowedTimeValues(quotes: Array[Quote]) {
- quotes foreach {quotePool.returnObject(_)}
- }
-
protected def loadFromPersistence: Long = {
var loadedTime1 = loadedTime
for (contract <- subscribedContracts) {
@@ -104,7 +87,6 @@
* from pool, return them
*/
quotes.synchronized {
- returnBorrowedTimeValues(quotes)
//storage.clear
}
@@ -132,7 +114,6 @@
// serToBeFilled.fireTSerEvent(evt)
storage.synchronized {
- returnBorrowedTimeValues(storage)
storageOf(contract).clear
}
}
@@ -150,7 +131,6 @@
// }
storage.synchronized {
- returnBorrowedTimeValues(storage)
storageOf(contract).clear
}
}
diff -r 0719ef0330c3 -r 5a13209248e2
libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/dataserver/TickerServer.scala
---
a/libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/dataserver/TickerServer.scala
Tue Feb 02 17:23:40 2010 +0800
+++
b/libs/lib.securities/src/main/scala/org/aiotrade/lib/securities/dataserver/TickerServer.scala
Tue Feb 02 20:47:04 2010 +0800
@@ -34,7 +34,7 @@
import java.util.Calendar
import org.aiotrade.lib.math.timeseries.{TFreq, TSer, TSerEvent, TUnit}
import org.aiotrade.lib.math.timeseries.datasource.AbstractDataServer
-import org.aiotrade.lib.securities.{Exchange, QuoteSer, Ticker, TickerPool,
TickerSnapshot}
+import org.aiotrade.lib.securities.{Exchange, QuoteSer, Ticker,
TickerSnapshot}
import org.aiotrade.lib.util.ChangeObserver
import scala.collection.mutable.ArrayBuffer
import scala.collection.mutable.HashMap
@@ -44,11 +44,6 @@
*
* @author Caoyuan Deng
*/
-object TickerServer {
- val tickerPool = new TickerPool
-}
-
-import TickerServer._
abstract class TickerServer extends AbstractDataServer[TickerContract,
Ticker] with ChangeObserver {
private val logger = Logger.getLogger(this.getClass.getName)
@@ -61,7 +56,7 @@
val updater: Updater = {
case ts: TickerSnapshot =>
- val ticker = borrowTicker
+ val ticker = new Ticker
ticker.copyFrom(ts)
storageOf(contractOf(ts.symbol).get) += ticker
}
@@ -73,22 +68,6 @@
postRefresh
}
- override protected def init {
- super.init
- }
-
- private def borrowTicker: Ticker = {
- tickerPool.borrowObject
- }
-
- private def returnTicker(ticker:Ticker) {
- tickerPool.returnObject(ticker)
- }
-
- override protected def returnBorrowedTimeValues(tickers: Array[Ticker]) {
- tickers foreach {tickerPool.returnObject(_)}
- }
-
def tickerSnapshotOf(symbol: String): Option[TickerSnapshot] = {
symbolToTickerSnapshot.get(symbol)
}
@@ -108,7 +87,7 @@
val tickerSnapshot = new TickerSnapshot
tickerSnapshot.addObserver(this, this)
tickerSnapshot.symbol = symbol
- symbolToTickerSnapshot.put(symbol, tickerSnapshot)
+ symbolToTickerSnapshot(symbol) = tickerSnapshot
}
}
}
@@ -143,7 +122,6 @@
}
storage synchronized {
- returnBorrowedTimeValues(storage)
storageOf(contract).clear
}
}
@@ -159,7 +137,6 @@
}
storageOf(contract) synchronized {
- returnBorrowedTimeValues(storage)
storageOf(contract).clear
}
}
diff -r 5a13209248e2 -r af4a9b8815a6
libs/lib.charting/src/main/scala/org/aiotrade/lib/charting/view/PopupIndicatorChartView.scala
---
a/libs/lib.charting/src/main/scala/org/aiotrade/lib/charting/view/PopupIndicatorChartView.scala
Tue Feb 02 20:47:04 2010 +0800
+++
b/libs/lib.charting/src/main/scala/org/aiotrade/lib/charting/view/PopupIndicatorChartView.scala
Tue Feb 02 21:06:36 2010 +0800
@@ -128,7 +128,6 @@
add(axisXPane, gbc)
}
- override def xControlPane: XControlPane = xControlPane
}
diff -r af4a9b8815a6 -r cd5d11193ec4
modules/modules.ui/src/main/resources/META-INF/services/org.aiotrade.lib.charting.descriptor.DrawingDescriptorActionFactory
---
a/modules/modules.ui/src/main/resources/META-INF/services/org.aiotrade.lib.charting.descriptor.DrawingDescriptorActionFactory
Tue Feb 02 21:06:36 2010 +0800
+++
b/modules/modules.ui/src/main/resources/META-INF/services/org.aiotrade.lib.charting.descriptor.DrawingDescriptorActionFactory
Tue Feb 02 21:08:53 2010 +0800
@@ -1,1 +1,1 @@
-org.aiotrade.modules.ui.netbeans.actionsfactory.NetBeansDrawingDescriptorActionFactory
+org.aiotrade.modules.ui.netbeans.actions.factory.NetBeansDrawingDescriptorActionFactory
|
[aiotrade~main:176] Fixed org.aiotrade.lib.util.ServiceConfigurationError: org.aiotrade.lib.c |
dcaoyuan | 02/02/2010 |





