Thursday, March 27, 2014

Apple MacBook Pro is the key to living the developer dream - have your iOS, your Android and Java EE

      My MacBook Pro is awesome.   On a single machine I am able to develop Java EE applications, write Android apps and of course evolve iOS mobile applications.   The high end machine is a fusion of what a developer needs.
1) Unix based OS
2) iOS development
3) Java EE development
4) Android development
5) Screen Sharing replaces RDP
6) Vmware Fusion 6 allows for running licensed versions of Windows 7 and an unlimited number of OSX 10.9 VM's
7) When installing iOS 8 beta on an iphone 5s or ipod touch 5th - you will need to cycle the device in member central as well as remove old provisioning profiles in XCode 6 | Devices - re-add them and then reconnect the device.  You will then be able to run new "Swift" coded apps from XCode 6

1) Make sure to turn off native mode for WebLogic 12c node manager on the mac
2) for Insufficient disk space error
use the flag -Dspace.detection=false

Friday, March 21, 2014

Using postgreSQL with WebLogic 12c and EclipseLink 2.4 or Hibernate 4.2

This article describes how to get the postgreSQL 9.3 database running on WebLogic 12.1.2 using EclipseLink 2.4 or Hibernate 4.2 as the JPA persistence provider

Tutorial assumes EclipseLink 2.4.2.v20130514-5956486 running on WebLogic on OSX 10.9 using postgreSQL 9.3 the postgreSQL
JDBC driver jar does not come with WebLogic
modify the class
Download the latest postgreSQL 9.3 JDBC 4.1 jar from
Install postgreSQL 9.3 on the mac
Create a database by running Applications/PostgreSQL 9.3/pgAdmin III

Create a datasource in the WebLogic console

JAVA SE RESOURCE_LOCAL persistence.xml

[EL Info]: 2014-03-19 18:03:22.718--ServerSession(1898536649)--Thread(Thread[main,5,main])--EclipseLink, version: Eclipse Persistence Services - 2.4.2.v20130514-5956486 [EL Config]: connection: 2014-03-19 18:03:22.722--ServerSession(1898536649)--Connection(223623898)--Thread(Thread[main,5,main])--connecting(DatabaseLogin( platform=>PostgreSQLPlatform user name=> "postgres" datasource URL=> "jdbc:postgresql://localhost:5432/obrienlabs"

JAVA EE JTA Container Managed persistence.xml

[EL Config]: connection: 2014-03-19 19:50:20.599--ServerSession(1214490893)--Connection(1145000203)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--connecting(DatabaseLogin( platform=>PostgreSQLPlatform user name=> "" connector=>JNDIConnector datasource name=>null )) [EL Config]: connection: 2014-03-19 19:50:20.599--ServerSession(1214490893)--Connection(417451054)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Connected: jdbc:postgresql:// User: postgres Database: PostgreSQL Version: 9.3.3 Driver: PostgreSQL Native Driver Version: PostgreSQL 9.3 JDBC4.1 (build 1101) [EL Finest]: sequencing: 2014-03-19 19:50:20.599--ServerSession(1214490893)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--sequencing connected, state is Preallocation_Transaction_NoAccessor_State

Hibernate 4.2.12 on WebLogic

Hibernate 4.3 will not run as a container managed persistence context on WebLogic because only the JPA 2.0 version of the EntityManager proxy is supported ( should support JPA 2.1).  Therefore using Hibernate 4.2 is recommended for 12c.


<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>   

Running any JPA provider that supports the 2.0 spec

1) For polymorphic inheritance - the workaround annotation @ForceDescriminator is definitely your friend

Total Pageviews