Monday, August 4, 2014

Multitenancy, JAX-RS 2.0, JPA 2.1, JSON-P 1.0, WebSocket and Cassandra on WebLogic 12.1.3

Oracle WebLogic 12.1.3 shipped on 23 June 2014.
This release is significant because it has partial Java EE 7 support ( JAX-RS 2.0,WebSocket (WS protocol) support, JSON-P and JPA 2.1 spec support). As is normal oracle procedure the first release into a partial EE upgrade requires shared library enablement and movement of the JPA SPI injection jar at the top of the server class path - so CMP persistence will work with EclipseLink 2.5 and Hibernate 4.3.
We can now inject 2.1 version of Hibernate 4.3 and EclipseLink 2.5 entityManagers.  EclipseLink 2.5  will allow us to use multi-tenancy and JPA-RS 2.0 annotations.

See the Oracle WebLogic 12.1.3 whitepaper

Up your heap and permgen in
-JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m  -XX:MaxPermSize=256m
+JAVA Memory arguments: -Xms256m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=512m  -XX:MaxPermSize=512m

JAX-RS 2.0

Enable JAX-RS 2.0 by deploying the 2.0 library war on 12.1.3
Library jax-rs(2.0,2.5.1)ActiveLibraryAdminServer100
You will see
<20-Aug-2014 5:52:17 o'clock PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
Aug 20, 2014 5:52:35 PM org.glassfish.jersey.server.ApplicationHandler initialize
INFO: Initiating Jersey application, version Jersey: 2.5.1 2014-01-02 13:43:00...

Add the following to your web.xml
    <description>JAX-RS Tools Generated - Do not modify</description>
    <servlet-name>JAX-RS Servlet</servlet-name>
    <!-- servlet-class></servlet-class-->
    <servlet-name>JAX-RS Servlet</servlet-name>
Add the following to your weblogic.xml
Use wlserver\orasocket\scripts\orasocket.min.js

JPA 2.1

JSON-P 1.0

WebSocket Protocol

Cassandra 2.0 NoSQL column DB
[OGM-122] Support Cassandra as Datastore - Hibernate JIRA


select count(1) from gps_record where coalesce(geohash, '') <> ''

No comments:

Total Pageviews