27 Eylül 2010 Pazartesi

Mavenize existing eclipse project

It is very easy, you should just change .project file of your eclipse project..

You should add below xml snippet to under element of .project file.

<buildCommand>
   <name>org.maven.ide.eclipse.maven2Builder</name>
   <arguments>
   </arguments>
  </buildCommand>
   
  

And also you should add below xml snippet under element of .project file.

<nature>org.maven.ide.eclipse.maven2Nature</nature>

edit :

Below snipped should be included .classpath file.

<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
   <attributes>
    <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
   </attributes>
 </classpathentry>



13 Temmuz 2010 Salı

Toplink and Glassfish

If you want to use toplink natively with Glassfish application server , you should make some configuration. First of all, you should change platform class for Glassfish like below, because SunAS9ServerPlatform class constructor expects DatabaseSessionImpl as argument, but it is called with DatabaseSession.


public SunAS9ServerPlatform(DatabaseSession newDatabaseSession) {

       super(newDatabaseSession);
}



Secondly, you should add below ines to your session.xml file.



<server-platform xsi:type="custom-platform">

<server-class>oracle.toplink.platform.server.sunas.SunAS9ServerPlatform</server-class>
<external-transaction-controller-class>oracle.toplink.transaction.sunas.SunAS9TransactionController</external-transaction-controller-class>
</server-platform>
 
 
As a final note, Toplink version is 11.1.1.0.1, Glassfish version is 3.0.1