Wednesday, February 22, 2017

How to setup Eclipse for Play framework

1. open <play-project-home>\project\plugins.sbt (c:\play-java\project\plugins.sbt)
    add the following line.

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

2. Open <play-project-home>\build.sbt
    add the following lines

EclipseKeys.preTasks := Seq(compile in Compile)

EclipseKeys.projectFlavor := EclipseProjectFlavor.Java

EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources) 

3. restart the play sbt console, so that sbt performs update for the new plugins.

4. in sbt console, type "eclipse"

5. import the new project into eclipse workspace
    File > Import > Existing Projects into Workspace > Next > Select root directory > browse <play-project-home>, Finish.



Thursday, January 12, 2017

How to import Database connections into Oracle SQL Developer from XML

1. R-click on Connection root, a small context menu appears

2.Click on "Import Connections"

Tuesday, January 10, 2017

How to export Database connections from Oracle SQL Developer to XML

This article shows how to export the configured database connections in Oracle SQL Developer so that it is easily share the connections with other team members. 

1. R-click on Connections root, a small context menu appears.

2. click on "Export Connections".

Saturday, December 31, 2016

Eclipselink Cache Coordination with JBoss and JMS

Cache Coordination enables EclipseLink to synchronize data changes in a distributed environment. for more information about cache coordination in EclipseLink, click here.

Following are the steps to enable Cache Coordination in JBoss AS7 / JBoss EAP6.
1. create JMS topic

2. creaet JMS connection factory

3. add the cache coordination properties into persistence.xml
<property name="eclipselink.cache.coordination.protocol" value="jms" />

<property name="eclipselink.cache.coordination.jms.topic" value="jms/EclipseLinkTopic" />

<property name="eclipselink.cache.coordination.jms.factory" value="jms/EclipseLinkTopicConnectionFactory" />

<property name="eclipselink.cache.coordination.jms.reuse-topic-publisher" value="true" />

<property name="" value="remote://HOST:PORT" />

4. in eclipseLink module.xml, add the following into <dependencies />
<module name="javax.jms.api"/>

5. in hornetq module.xml, add the following into <dependencies />
<module name="org.eclipse.persistence"/>


Wednesday, November 30, 2016

Putting and getting data to/from infinispan

Example shown below is applicable and tested working in JBoss EAP 6.x and JBoss AS 7.x

1. Inject the cache container with @resouce annotation.
    a) name, inject with the container name
    b) lookup, inject with the jndi name configured in the cache container.

code below is presented with method (a)
@Resource(name = "java:jboss/infinispan/container/CACHE-CONTAINER-NAME-IN-STANDALONE.XML")
private CacheContainer container;

make sure the cache container name exist in standalone.xml 
else there will be NullPointerException when getting the cache from the cache container.


Related Posts Plugin for WordPress, Blogger...