Thank you for visiting! If you liked the site, please add a bookmark, else add a critical comment! Would you like to visit Greece? Traditional Greek flag This real estate site is only available in Greek! The holy mountain

Tuesday, 8 February 2011

Setting up Oracle 11g Complex Event Processing (CEP) server

 The power of change in human life has long fascinated people. Babies are born, other people pass away,  employees are made redundant, others get promoted. Businessmen, or whole states, go bankrupt, while others prosper.  Even at war, a sudden change in weather can reverse the outcome of an initially easy to win, battle. The highly educated executives soon realized that staying informed about  business, environmental, or other changes is of vital importance. That's why they keep asking for suitable dynamic IT tools, such as the business activity monitor (BAM), Business Intelligence (BI) and CEP.
In order to briefly compare the characteristics of each technology, I shall quote a few lines of text of the  new SOA Handbook authored by Lucas Jellema: "BAM may seem very similar to Business Intelligence (BI) as you know it, and of course there is a lot of similarity if not overlap. The key differentiator is the real-time aspect of BAM, along with the active alerting responsibility it has. The scope in time of BAM dashboards is usually fairly short—up to hours or days—and would hardly ever cross the quarter or year boundary, whereas traditional BI tends to take a look at data from a more historic, longer-term perspective in a more passive way."
Let us now focus on CEP. The scope of CEP is less than a hour, in other words the data are as dynamic, as your processor power and network speed permit. As for detailed setup instructions of the CEP server one can visit:
http://theo.vanarem.nl/2010/05/27/getting-started-with-oracle-11g-complex-event-processing-cep/

Once you are done with the setup you start the Jetty server and receive the following messages in the Eclipse Galileo 3.5.2 log:

<8 Φεβ 2011 2:36:28 μμ EET> <Notice> <LibExt> <BEA-000000> <The extension library bundle "oracle.jdbc.driver" was started successfully>
<8 Φεβ 2011 2:36:30 μμ EET> <Warning> <Store> <BEA-280101> <The persistent file store "tlog_WlevServer" is forced to use buffered I/O and so may have significantly degraded performance. Either the OS/hardware environment does not support the chosen write policy or the native wlfileio library is missing. See store open log messages for the requested and final write policies. See the documentation on store synchronous write policy configuration for advice.>
<8 Φεβ 2011 2:36:30 μμ EET> <Notice> <LoggingService> <BEA-320400> <The log file C:\Oracle\Middleware\singleServer\user_projects\domains\ocep_domain\defaultserver\server.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<8 Φεβ 2011 2:36:30 μμ EET> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Oracle\Middleware\singleServer\user_projects\domains\ocep_domain\defaultserver\server.log00016. Log messages will continue to be logged in C:\Oracle\Middleware\singleServer\user_projects\domains\ocep_domain\defaultserver\server.log.>
<8 Φεβ 2011 2:36:35 μμ EET> <Notice> <evs4j> <BEA-2049007> <The cluster protocol is disabled>
<8 Φεβ 2011 2:36:35 μμ EET> <Notice> <BDBProvider> <BEA-2052004> <Created and registered BDBProvider default-provider>
<8 Φεβ 2011 2:36:38 μμ EET> <Notice> <Spring> <BEA-2047000> <The application context for "com.oracle.cep.cartridge.jdbc" was started successfully>
...
Exception in thread "RMI Reaper" java.lang.OutOfMemoryError: PermGen space

For the solution to the problem one needs to consult a useful post published back in 2009:
http://oraclebpelindepth.blogspot.com/2009/04/javalangoutofmemoryerror-permgen-space.html
 in order to edit the file: startwlevs.cmd, found in C:\Oracle\Middleware\singleServer\user_projects\domains\ocep_domain\defaultserver as shown:

@ECHO OFF

@rem Copyright 2006 BEA Systems, Inc.

call ".\setDomainEnv.cmd" %*

set DGC_ARGS=-Xgcprio:deterministic -XpauseTarget=10ms
set DEBUG_ARGS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n
set DGC=
set JVM_ARGS=-XX:MaxPermSize=1024m

set DEBUG=
set ARGS=

:loop

if "%1" == "" goto endloop

if "%1" == "-dgc" (
 set DGC=%DGC_ARGS%
 shift
) else if "%1" == "-debug" (
 set DEBUG=%DEBUG_ARGS%
 shift
) else if "%1" == "-debugPort" (
 set DEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,address="%2",server=y,suspend=n
 shift
 shift
) else (
 set ARGS=%ARGS% "%1"
 shift
)

goto loop
:endloop



"%JAVA_HOME%\bin\java" %JVM_ARGS% %DGC% %DEBUG% -Dwlevs.home="%USER_INSTALL_DIR%" -Dbea.home="%BEA_HOME%" -jar "%USER_INSTALL_DIR%\bin\wlevs.jar" %ARGS%
:finish

I quote from the aforementioned blog:

"Is this the final solution?


Not really, if you keep loading loads of new processes or huge number of classes this might delay your Out Of Memory Error but will not fix it.


The only solution?


The only solution is to bounce the server once you see this error.


Where else?


This is a general issue faced by all sun java based servers. When huge number if class are loaded as part of an application, this error is expected."

In short, it seems that not all some things change, some are everlasting and prosperous, such as software defects, which persist against any change in time, wear, version or any attempt to fix! Are java bugs really immortal?