TK

Jeg har i et par innlegg i vår kommentert egenkapitalsituasjonen til TK. Nå viser det seg at TK må nedskrive verdier for 438 millioner. I mars skrev jeg at TK sannsynligvis måtte nedskrive 180 millioner på sin investering i Nordkraft. Fasit viser seg nå å være 256 millioner, så dette er noe verre enn jeg hadde forventet.

Med tap etter skatt på 487,6 millioner  begynner egenkapitalandelen å bli skummelt lav. Troms Kraft AS sin egenkapital i konsernet (majoriteten) er trolig nede i rundt 400 millioner, men regnskapet er ikke lagt ut så nøyaktig tall har jeg ikke. Morselskapets egenkapital er trolig på rundt 600 millioner.

Selskapet har nok redusert balansen noe i 2013. I alle fall tyder gjelden på 3,7 milliarder i 2013-regnskapet på det, men egenkapitalandelen til selskapet blir nok fortsatt veldig lav, antakeligvis på rundt 10 %-14 % avhengig av om en ser på brutto eller netto gjeld.


G and I in Europe and Japan

Izabella Kaminska reports here on a Credit Suisse comparison of Japan and the Euro area (h/t Scott Sumner). Here is an interesting diagram from that report:


According to Kaminska:
As the analysts note, a powerful fiscal stimulus in Japan helped to counter the demand shortfall. That caused personal consumption to continue to grow until 1997 and investment to rebound almost to its previous peak in just six years — something which isn’t slated for Europe any time soon.

Well, the increase in G counteracting an unexplained decline in I is one interpretation. This is the "deficient demand" interpretation that so many like to portray as obvious. But in fact, it's difficult to ascertain the direction of causality from just a picture.

The Japanese data above corresponds to what I posted some time ago here: What's Up with Japan? In response to that post, Mark Sadowski alerted me to the fact that the Japanese investment series plotted above includes both private and government spending. Here's what things look like when we decompose this aggregate (I discuss in more detail here: Another look at the Koizumi boom):


So it seems that there was a boom in private investment during the Koizumi years (something that Krugman gets wrong here, and something I'm not sure he's acknowledged). Moreover, this boom coincided with a slowing or outright contraction in government purchases. And in a liquidity trap era, I might add! What do our conventional "deficient demand" theories have to say about this? Maybe there is something more complicated than a simple IS-LM+liquidity trap story going on? I'm just asking. Humbly yours, DA.

How to monitor the data source connections and sql queries in jboss

To allow us to debug our jboss server for possible connection leaks, wrong sql queries normally we do 2 changes:

1.) In persistence.xml, set hibernate.show_sql to true

2.) In jboss's standalone.xml, we set the hibernate logger to DEBUG
<logger category="org.hibernate">
<level name="DEBUG"/>
</logger>

But there's another not so popular way I guess, enabling spy setting in jboss's datasource.
1.) In your datasource setting add spy="true", example:
<datasource jta="true" jndi-name="java:jboss/datasources/czetsuyaDS" pool-name="czetsuyaPool" enabled="true" use-java-context="true" spy="true" use-ccm="true">

2.) Add jboss.jdbc.spy logger in the logging section of jboss
<logger category="jboss.jdbc.spy">
<level name="TRACE"/>
</logger>

After that restart jboss and you should see logs similar to:
19:43:40,006 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Connection] getMetaData()
19:43:40,041 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Connection] getCatalog()
19:43:40,041 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Connection] getMetaData()
19:43:40,041 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Connection] createClob()
19:43:40,042 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Connection] close()
19:43:41,256 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Connection] getAutoCommit()
19:43:41,256 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Connection] getMetaData()
19:43:41,256 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Connection] createStatement()
19:43:41,257 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Statement] executeQuery(select relname from pg_class where relkind='S')
19:43:41,257 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [ResultSet] next()
19:43:41,258 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [ResultSet] close()
19:43:41,258 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Statement] close()
19:43:41,258 DEBUG [jboss.jdbc.spy] (ServerService Thread Pool -- 64) java:jboss/datasources/czetsuyaDS [Connection] createStatement()
...
executeUpdate(...)
...