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
http://www.oracle.com/technetwork/middleware/weblogic/overview/weblogic-server-12-1-3-whitepaper-2227074.pdf

Up your heap and permgen in
user_projects/domains/base_domain/bin/setDomainEnv.sh
-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
<pre>
  <servlet>
    <description>JAX-RS Tools Generated - Do not modify</description>
    <servlet-name>JAX-RS Servlet</servlet-name>
    <!-- servlet-class>javax.ws.rs.core.Application</servlet-class-->
    <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>JAX-RS Servlet</servlet-name>
    <url-pattern>/jaxrs/*</url-pattern>
    <url-pattern>/rest/*</url-pattern>
  </servlet-mapping>
</pre>
Add the following to your weblogic.xml
<pre>
   <wls:library-ref>
      <wls:library-name>jax-rs</wls:library-name>
      <wls:specification-version>2.0</wls:specification-version>
   </wls:library-ref>
</pre>
Use wlserver\orasocket\scripts\orasocket.min.js

JPA 2.1



JSON-P 1.0



WebSocket Protocol



Cassandra 2.0 NoSQL column DB
https://code.google.com/a/apache-extras.org/p/cassandra-jdbc/downloads/list
http://stackoverflow.com/questions/19042825/is-cql-jdbc-1-2-5-compatible-with-cassandra-thrift-2-0-1-and-cassandra-clientuti
http://stackoverflow.com/questions/15983190/cassandra-client-java-apis
http://code.google.com/p/kundera/
https://github.com/impetus-opensource/Kundera
https://hibernate.atlassian.net/browse/OGM-122
[OGM-122] Support Cassandra as Datastore - Hibernate JIRA



SQL

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





No comments:

Total Pageviews

Followers