svenfila.wordpress.com
Script output redirection controlled from within a script | Sven's Blog
https://svenfila.wordpress.com/2012/10/05/script-output-redirection-controlled-from-within-a-script
HAI, CAN HAS STDIO? October 5, 2012. Script output redirection controlled from within a script. It’s trivial to send an output of a script to a file in bash:. But what if you want to control this redirection from within the script? It can actually be done in a really simple way as well. Here is a sample script that sends it’s own output to a file:. Bin/bash outfile=log # Send stdout to a file exec 1 $outfile echo This line is printed to stdout. Now this script can be executed simply as:. A more exciting ...
svenfila.wordpress.com
Spring MVC Test, and content negotiation and AJAX | Sven's Blog
https://svenfila.wordpress.com/2013/05/27/spring-mvc-test-and-content-negotiation-and-ajax
HAI, CAN HAS STDIO? May 27, 2013. Spring MVC Test, and content negotiation and AJAX. In recent projects we have used a combination of Spring MVC framework. And AJAX calls using jQuery. For automated testing of all them, we have used Spring MVC Test framework. The setup is quite typical. Here is the simplistic version of an MVC request mapping:. For requests that expect HTML response, and plain JSON for requests that expect JSON response. Header set to value. AjaxSetup({ dataType : 'json' });. We can test...
svenfila.wordpress.com
Optimising Sql.firstRow() in Groovy | Sven's Blog
https://svenfila.wordpress.com/2013/12/22/optimising-sql-firstrow-in-groovy
HAI, CAN HAS STDIO? December 22, 2013. Optimising Sql.firstRow() in Groovy. Returns the first row in the result set received from the database. Internally it invokes. And takes the first element from the resulting list of rows. In production code that works just fine — the consumer should construct the SQL statements so that only minimum amount of rows is selected from the database. In test code things may not be so straightforward however. Def row = sql.firstRow('select * from my large table'). Class Sq...
aleksz-java.blogspot.com
My Java blog: Populating Oracle v$session in Spring web app
http://aleksz-java.blogspot.com/2012/02/populating-oracle-vsession-in-spring.html
Wednesday, February 29, 2012. Populating Oracle v$session in Spring web app. Our project heavily relies on Oracle PL/SQL procedures. Those procedures are used by different applications and database developers always wanted to know two things:. 1) Which application is calling the procedure. 2) Who is currently logged into the application. There are already some samples of setting client identifier using this method, but I found most of them incomplete. Here comes another one:. Thoughts while making coffee.
aleksz-java.blogspot.com
My Java blog: February 2012
http://aleksz-java.blogspot.com/2012_02_01_archive.html
Wednesday, February 29, 2012. Populating Oracle v$session in Spring web app. Our project heavily relies on Oracle PL/SQL procedures. Those procedures are used by different applications and database developers always wanted to know two things:. 1) Which application is calling the procedure. 2) Who is currently logged into the application. There are already some samples of setting client identifier using this method, but I found most of them incomplete. Here comes another one:. Subscribe to: Posts (Atom).
aleksz-java.blogspot.com
My Java blog: December 2011
http://aleksz-java.blogspot.com/2011_12_01_archive.html
Tuesday, December 20, 2011. Are static fields initialized before constructor is called? I've encountered this while debugging one very strange issue in third party library. Decompiled code made this case even more interesting and not so obvious. How do you think, what is the output for following program? Constructor is called before "staticField" is initialized. Labels: java static constructor. Subscribe to: Posts (Atom). Optimising Sql.firstRow() in Groovy. An artist is designer’s worst enemy.
aleksz-java.blogspot.com
My Java blog: March 2012
http://aleksz-java.blogspot.com/2012_03_01_archive.html
Saturday, March 31, 2012. Confluence 3.x and com.atlassian.confluence.content.render.xhtml. Comatlassian.confluence.content.render.xhtml is a package from Confluence 4, responsible for rendering new XHTML macro. If you compile your plugin for Confluence 4 and your plugin has xhtml-macro/ , then you will get an import of com.atlassian.confluence.content.render.xhtml in your MANIFEST.MF. Something like this:. Comatlassian.confluence.content.render.xhtml;version="0.0". Friday, March 30, 2012. The only examp...
svenfila.wordpress.com
Spring MVC Test Support with an open HTTP session | Sven's Blog
https://svenfila.wordpress.com/2012/07/10/spring-mvc-test-support-with-an-open-http-session
HAI, CAN HAS STDIO? July 10, 2012. Spring MVC Test Support with an open HTTP session. Spring MVC Test Support. Is a neat way to test Spring MVC controllers. It is easy to use and has a fluent interface. It also runs fast, being comparable to plain old unit tests rather than integration tests based on, say, Selenium WebDriver. Recently there was the first milestone of. To the wild, with plans to integrate it to the main Spring Test Support in version 3.2. That is used by. The base class for tests creates ...
svenfila.wordpress.com
Running Java applications in a VMware virtual machine | Sven's Blog
https://svenfila.wordpress.com/2013/03/15/running-java-applications-in-a-vmware-virtual-machine
HAI, CAN HAS STDIO? March 15, 2013. Running Java applications in a VMware virtual machine. When setting up a virtual server for running Java applications, such as a web app, it is essential to avoid some virtualisation specific pitfalls. However, JVM is very sensitive to memory overcommitment because JVM heap space is in active use constantly. Therefore VMware ballooning has to be avoided for virtual machines running JVM processes (see here. And memory limit (. That it is using a ridiculous amount memory...