15 September 2014

Project Euler #125

It is interesting how I analyzed this problem --> first attempt was doing an horrible brute force which  would take milliards of years to complete.

Classical problem, where I had to re-design the solution, after getting a couple of "duplicate numbers" (also incorporated to the problem). Simple & Hard. This is the taxonomy of problems I must create.

My performance is a little slow:

Last 10 Problems Solved

1 Problem 12511 Sep 14 (14:56)
2 Problem 10211 Jan 14 (13:58)

09 September 2014

OC4J: precompiling JSP

JSPs can be precompiled by OC4J tool: ojspc
http://sqltech.cl/doc/oas10gR31/web.1013/b28961/ojspc.htm

Similar to my last post for WLS:

ojspc -verbose -addclasspath D:\web-oc4j-v3\dist\foo.jar;D:\web-oc4j-v3\dist\lib\bar.jar qux.jsp

As, you can see you need to add libraries to "addclasspath" and the jsp file, or wildcard.

Remember to define environment local variables:

i.e.:

set JAVA_HOME=C:\oracle\jdk150_11
set ORACLE_HOME=D:\oracle\oc4j_extended_101340
set PATH=%ORACLE_HOME%\j2ee\home\jsp\bin;%PATH%
set PATH=%JAVA_HOME%\bin;%PATH%


02 September 2014

WLS: Precompile ear/war EJB/JSP

WLS has a very useful tool to precompile EJBs and JSPs so we can avoid extra overhead at runtime on the container.

It is called APPC, this tool calls underneath to jspc and ejbc to achieve this task.
http://docs.oracle.com/cd/E17904_01/web.1111/e13719/appc_ejbc.htm#EJBPG1088

After calling setDomainEnv.sh (.cmd) we can execute directly: weblogic.appc [files]

Also, we can compile only JSPs files with: weblogic.jspc [files]
http://docs.oracle.com/cd/E17904_01/web.1111/e13712/reference.htm#i57791

It is recommended to use it at development time as well, so we can hit compilation errors before the first request on the web container.

It exists the Ant task as well: wlapcc

Sample:

java weblogic.jspc -forceGeneration -keepgenerated -verboseJspc -d d:\tmp\export\ -classpath .;D:\proj\webapp-wl-v4\web\WEB-INF\classes;D:\proj\webapp-wl-v4\foo.jar;D:\proj\webapp-wl-v4\lib\bar.jar index.jsp




19 August 2014

Spring in WLS 12.1.3

Support for Spring Framework on WebLogic Server 12.1.3

WebLogic Server 12.1.3 supports the WebLogic Server/Spring integration features described in this document with Spring Framework versions 3.0.x, 3.1.x, and 4.0.x (note that version 3.2.x is not supported).

Other versions of Spring may be used in WebLogic Server applications without using the integration features described in this document, similar to the way other open source technologies may be used in WebLogic Server applications. In such cases, Oracle does not support the WebLogic Server/Spring integration features, but does provide support for WebLogic Server itself, and does provide problem resolution assistance if WebLogic Server is not providing documented capabilities.

http://docs.oracle.com/middleware/1213/wls/SPRNG/intro.htm#BHCDGJFA

29 July 2014

JVM for VisualVM

When trying to execute VisualVM you may get:




Cannot find Java 1.7 or higher.
(for 1.3.8)
or

Cannot find Java 1.6 or higher.
 (for 1.3.4)

VisualVM only takes parameters form JVM through arguments or values given at:

visualvm_138/etc/visualvm.conf
(/Applications/VisualVM.app/Contents/Resources/visualvm/etc)

# Default location of JDK:
#
# It can be overridden on command line by using --jdkhome



# Be careful when changing jdkhome.
# There are two VisualVM launchers for Windows (32-bit and 64-bit) and
# installer points to one of those in the VisualVM application shortcut
# based on the Java version selected at installation time.
#
#visualvm_jdkhome="/path/to/jdk"


Modify :

visualvm_jdkhome="/path/to/jdk"

to your JDK path.

i.e.:

visualvm_jdkhome=C:\oracle\jdk1.7.0_45

visualvm_jdkhome=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home


This is the same for Netbeans 8.0.1 Portable, but the variable is called: netbeans_jdkhome

- log can be retrieve by:
visualvm -J-Djava.util.logging.config.file=${path_to_jdk_logging_config_file} 

or in the credits (about), there is a bottom to show the standard output (and path to it).

02 July 2014

WLS Server timeout: ServerLifeCycleTimeoutVal

I wasn't able to start correctly my Admin Server, and the following BEA message appeared in the log:
<BEA-000378> <Server failed to shutdown within the configured timeout of 30 seconds. The server process will exit now.>
 This is for MBean attribute: ServerLifeCycleTimeoutVal

That can be set as System Property at java startup  command line:

        -Dweblogic.ServerLifeCycleTimeoutVal=XXX

where XXX are seconds for timeout.

This can be also configured thru Admin Console at:
(increasing the Server LifeCycle Timeout before executing the force shutdown)

   Domain -> Environment -> Servers -> YOUR_SERVER -> Control --> Start/Stop



More details at:

http://docs.oracle.com/cd/E21764_01/apirefs.1111/e14397/T3Srvr.html
http://docs.oracle.com/cd/E21764_01/web.1111/e13708/server_life.htm
http://docs.oracle.com/cd/E17904_01/apirefs.1111/e13951/core/index.html

08 June 2014

N Is a Number: A Portrait of Paul Erdös (1993)

de George Paul Csicsery

Documental que habla de la vida del prolífico matemático Paul Erdös, su simpática excentricidad, reuniones con otros matemáticos alrededor del mundo en un época en la cual viajar tanto no era común.

Un húngaro judio sobreviviente de la segunda guerra donde la política también le importaba, pero como siempre la veia de una forma lúdica. Son varios cortos de conversaciones con él, sus anécdotas y la explicación de el coloquial Número de Erdös, con muy simples tomas de nivel amauter que sin duda lo hicieron otros colegas de él.

Del punto vista cineasta no atrae demasiado, pero si conocer de la vida de una de las grandes mentes matemáticas que ayudó a escribir más de 1500 papers y no es masivamente conocido.

26 May 2014

Distinctive Recipes, 2nd Ed.: 12.1.2 + 12.1.1 (and 10.3.x)

This is the Second Edition of Oracle WebLogic Server 12c: Distinctive Recipes: Architecture, Development and Administration, where new recipes are added and several have changed a lot, including differences from 12.1.1 (and 11g) to the new architectural design of 12.1.2 (and beyond based on the road-map).

After Oracle acquisition, WLS always was considered the main tool for Middleware, and several changes were planned for it, now it is the time and this book provides detailed recipes to take advantage of them and resolves issues in a practical and quick way.

Important new chapters from new features were added, related to Node Managers, JMS and Distributed Destinations, Cluster Targeted JMS, Server Templates, among others.

It is a new upgrade for WLS 12.1.2, including tips & tricks to get the best of this world class application container.

09 February 2014

Kadon Prize

I got another nice prize from Kadon Games !!!

The place where you can find incredible fun challenging puzzle games.


Blog Archive

Disclaimer

Qux