Thank you for visiting! If you liked the site, please add a bookmark, else add a critical comment! Would you like to visit Greece? Traditional Greek flag This real estate site is only available in Greek! The holy mountain

Saturday, 4 April 2015

A technical review of LG LB650 smart tv series

The  smart TV menu

This article mentions some technical characteristics and personal experiences of setting up and  using  the LG 3D smart tv series for a limited time. The specific model at hand is 32LB650, which comes with WebOS and also provides a satellite receiver.
On the bright side,  the tv offers trouble free ways of wireless and ethernet connection,USB and HDMI sockets, comes with 2 pairs of 3D glasses, which I have not been able to test, hence 3D content is still rather scarce to find in a reasonable price. The 500Hz refresh rate is good for watching sports, but when the background has stripes of different colours the picture quality deteriorates. The ecological function is wonderful, as the tv LEDs dim automatically while the daylight decreases.
On the dark side, the assembling   and installation procedure is rather poorly described in the manual. Furthermore, the remote control is practically suited only for traditional, non smart tv operation. One has either to buy a magic remote for 50 € by LG, or setup an application for the mobile called LG TV plus almost for  free. This offers a touch pad similar to laptop users, full access to the WebOS menu applications and normal functions of the regular tv use, such as switching off or lowering the volume. However, the application sends all user commands  via the internet and maybe the LG servers, to the tv, meaning that perhaps all user input is captured and analyzed for statistical, business,  or any other reasons. Therefore, an internet connection is required, no Bluetooth option as far as I can tell. On the other hand, Samsung offers an additional remote for smart tv operation at no extra cost.  What is worse is the primitive  web browser, which does not allow neither any downloads, nor acrobat plugin installation. Thus, playing the vast majority of videos or watching live stream tv channels on line is often impossible. Only newest HTML 5 pages are compatible. Having contacted the LG support for offering a solution did not brought back any reply or hint. Moreover, the browser throws often out of memory errors and the bookmarks cannot be organized in folders. I guess that internally a java virtual machine is running, or maybe not?
All in all, the menu and regular or satellite tv operation works well, the sound is crystal clear, but the WebOS seems in my personal opinion, not suitable for smart tv operation, Finally, the browser leaves a great deal  of bug fixes and improvements to be expected in future releases.

Saturday, 1 February 2014

JDeveloper 12c to 11g backwards migration

In case you could not wait to migrate your last project to the currently newer version of JDeveloper 12c, you might have been disappointed with several recurring  errors, or an entire EJB 3 application not running at all.
Familiar or not?


In this new post a solution for returning to the older version will be presented, for those who receive an error message that the workspace cannot open any more with JDeveloper 11g . The exact phrasing is: " Unable to load application file. Workspace already migrated to newer version (12.1.2.0.0)".

Migration can still be undone!

One needs to edit the .jws workspace with an editor, first commenting out the lines mentioning the 12.1.2.0.0 version like this:

<?xml version = '1.0' encoding = 'UTF-8'?>
<jws:workspace xmlns:jws="http://xmlns.oracle.com/ide/project">
   <hash n="adrs-workspace-properties">
      <value n="adrs-instance-binding" v="DefaultServer"/>
      <value n="deploy-timeout" v="0"/>
      <value n="runtime-application-name" v="ejb3inaction"/>
   </hash>
   <hash n="adrs-workspace-weblogic-properties">
      <value n="hot-class-reload" v="ide-default"/>
   </hash>
   <value n="application-package-prefix" v="actionbazaar"/>
   <url n="application-source-directory" path="src/"/>
   <value n="appTemplateId" v="#genericApplicationTemplate"/>
   <hash n="appWebServicePolicy">
      <value n="location"/>
      <value n="LOCATION_TYPE" v="policy.config.PolicyOptions.LocationType.FILE_STORE"/>
      <value n="SERVER_LOCATION" v="IntegratedWebLogicServer"/>
   </hash>
   <hash n="component-versions">
      <value n="oracle.adf.share.dt.migration.jps.JaznCredStoreMigratorHelper" v="11.1.1.1.0"/>
      <!--value n="oracle.adf.share.dt.migration.wsm.PolicyAttachmentMigratorHelper" v="12.1.2.0.0"/-->
<value n="oracle.adf.share.dt.migration.wsm.PolicyAttachmentMigratorHelper" v="11.1.2.0.0"/>     
<value n="oracle.adfdt.controller.adfc.source.migration.SavePointDataSourceForWLSMigrator" v="11.1.1.1.0"/>
      <value n="oracle.adfdtinternal.model.ide.security.extension.AdfSecurityMigrator" v="11.1.1.1.0.13"/>
      <value n="oracle.adfdtinternal.model.ide.security.wizard.AdfSecurityMigrator" v="11.1.1.1.0.13"/>
      <value n="oracle.ide.model.Project" v="11.1.1.1.0;11.1.2.0.0"/>
<!--value n="oracle.ide.model.Project" v="11.1.1.1.0;11.1.2.0.0;12.1.2.0.0"/-->     
<value n="oracle.jbo.dt.jdevx.deployment.JbdProjectMigrator" v="11.1.2.0.0"/>
      <value n="oracle.jdevimpl.appresources.ApplicationSrcDirMigrator" v="11.1.2.0.0"/>
      <value n="oracle.jdevimpl.deploy.ear.OarMigratorHelper" v="11.1.1.1.0"/>
      <value n="oracle.jdevimpl.deploy.mar.MarMigratorHelper" v="11.1.1.1.0"/>
      <value n="oracle.jdevimpl.deploy.migrators.JeeDeploymentMigrator" v="11.1.2.0.0"/>
      <value n="oracle.jdevimpl.xml.oc4j.ds.DataSourcesMigratorHelper" v="10.1.3.5.0"/>
      <value n="oracle.jdevimpl.xml.oc4j.jps.JpsConfigMigratorHelper" v="11.1.1.1.0.1"/>
      <value n="oracle.jdevimpl.xml.wl.WeblogicMigratorHelper" v="11.1.1.1.0"/>
      <value n="oracle.mds.internal.dt.deploy.base.MarMigratorHelper" v="11.1.1.1.0"/>
      <value n="oracle.mds.internal.dt.ide.migrator.MDSConfigMigratorHelper" v="11.1.1.0.5313"/>
   </hash>
   <list n="contentSets">
      <string v="oracle.mds.internal.dt.ide.appresources.MDSAppResourceCSProvider/MDSAppContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ADFContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ApplicationSrcContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ApplicationLevelMavenPOMContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ApplicationBuildToolContentSet"/>
      <string v="oracle.jdeveloper.model.PathsConfiguration/ResourceBundlesContentSet"/>
   </list>
   <list n="listOfChildren">
      <hash><url n="URL" path="Model/Model.jpr"/></hash>
      <hash><url n="URL" path="UserInterface/UserInterface.jpr"/></hash>
   </list>
   <hash n="oracle.jdeveloper.deploy.dt.DeploymentProfiles">
      <hash n="profileDefinitions">
         <hash n="ejb3inActionV2">
            <hash n="archiveOptions">
               <value n="compressed" v="true"/>
               <value n="hasManifest" v="true"/>
            </hash>
            <value n="defaultConnection" v="standalone"/>
            <hash n="dependencies">
               <list n="dependencyList">
                  <hash>
                     <value n="adapterClass" v="oracle.jdevimpl.deploy.common.ArchiveProfileDependable"/>
                     <url n="ownerURL" path="Model/Model.jpr"/>
                     <value n="pathInEar" v=""/>
                     <value n="profileName" v="ejb3inactionModel"/>
                  </hash>
                  <hash>
                     <value n="adapterClass" v="oracle.jdevimpl.deploy.common.ArchiveProfileDependable"/>
                     <url n="ownerURL" path="UserInterface/UserInterface.jpr"/>
                     <value n="pathInEar" v=""/>
                     <value n="profileName" v="ejb3inActionV2"/>
                  </hash>
               </list>
            </hash>
            <url n="earURL" path="deploy/ejb3inActionV2.ear"/>
            <value n="enterpriseAppName" v="ejb3inActionV2"/>
            <hash n="fileGroups">
               <list n="groups">
                  <hash>
                     <list n="contributors">
                        <hash>
                           <value n="type" v="9"/>
                        </hash>
                     </list>
                     <value n="displayName" v="Application Descriptors"/>
                     <hash n="filters">
                        <list n="rules">
                           <hash>
                              <value n="pattern" v="**"/>
                              <value n="type" v="0"/>
                           </hash>
                        </list>
                     </hash>
                     <value n="internalName" v="ear-metainf"/>
                     <value n="type" v="1"/>
                  </hash>
                  <hash>
                     <value n="displayName" v="Application Libraries"/>
                     <hash n="filters">
                        <list n="rules">
                           <hash>
                              <value n="pattern" v="xml.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="xmlparserv2.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="adf-controller-rt-common.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="adf-controller-api.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="adf-controller.jar"/>
                              <value n="type" v="1"/>
                           </hash>
                           <hash>
                              <value n="pattern" v="**"/>
                           </hash>
                        </list>
                     </hash>
                     <value n="internalName" v="libraries"/>
                     <list n="selectedLibraries"/>
                     <value n="targetWithinJar" v="lib"/>
                     <value n="type" v="3"/>
                  </hash>
               </list>
            </hash>
            <hash n="libraryDependencies">
               <list n="unselectedLibraries"/>
            </hash>
            <value n="profileClass" v="oracle.jdeveloper.deploy.ear.EarProfile"/>
            <value n="profileName" v="ejb3inActionV2"/>
         </hash>
      </hash>
      <list n="profileList">
         <string v="ejb3inActionV2"/>
      </list>
   </hash>
   <hash n="oracle.jdeveloper.deploy.SecurityDeploymentSettings">
      <value n="Security-Deployment-Migrate-Users-And-Groups-Key" v="true"/>
      <value n="Security-Deployment-Overwrite-Application-Policies-Key" v="true"/>
      <value n="Security-Deployment-Overwrite-Credentials-Key" v="true"/>
   </hash>
   <hash n="oracle.jdeveloper.model.PathsConfiguration">
      <hash n="ApplicationSrcContentSet">
         <list n="pattern-filters">
            <string v="+**"/>
         </list>
         <list n="url-path">
            <url path="src/"/>
         </list>
      </hash>
   </hash>
   <hash n="oracle.mds.internal.dt.ide.CustOptions">
      <list n="customizationLibraries">
         <hash/>
      </list>
   </hash>
   <hash n="Weblogic JDBC">
      <value n="Weblogic-JDBC-Auto-Sync-Key" v="false"/>
   </hash>
</jws:workspace>


Thus, by removing the references to  version 12.1.2.0.0 one can continue development with the older version and postpone the migration, if necessary. Finally, one can find  further migration details as usual here.




Sunday, 29 December 2013

Comments on Lehr- und Übungsbuch der deutschen Grammatik, Neubearbeitung, Deutsch-Englisch, A Practice Grammar of German by Hilke Dreyer, Richard Schmitt

Image may differ!
On the bright side, the text is of very good quality with only few spelling errors, accurate definitions and plenty of examples. The most important advantage of the book is that it offers a plethora of exercises both for the beginner and the advanced student. Its colourful design offers an image, which is very pleasant to the reader's eyes. A separate key to the exercises, not written by the authors, is available, but at an extra cost. The book is available in several foreign languages, besides English and Italian.
On the dark side, when compared with other, older school German grammar books such as the venerate Lernergrammatik für Deutsch als Fremdsprache by Lorentz Nieder, there is vital information missing. For instance, when one is trying to build an argument, several words are of the essence, such as Argumentativpartikel. This information is crucial for someone who is preparing to sit for an official German language examination.
All in all, the book offers great help in self study, filling many grammar gaps with explanations, exercising and reference. Therefore, it is highly recommended for those who need to a synoptic grammar introduction or  to master quickly the German language. 

Wednesday, 11 December 2013

Review of Hewlett Packard Pavilion laptop series


HP keys can be faulty
I have used a minimum of three HP laptops, two of them Pavilions, still working. The older one running Windows xp flawlessly, came with many CD's such as drivers, including two CD's with versions of Windows in different languages. On the other hand, the newer one has been rather a disappointment!
Starting from unpacking I found out the printed configuration label mentioning an older memory type, other than the one advertised on their site.  Contacting HP Hellas for several times by phone, to report the error in the configuration, did not yield any result. Instead  filing a written complain at the Consumer protection agency and contacting the HP executive team did. Some weeks later I received a call to  fetch a replacement laptop of similar price.
In that case there were no DVD's at all, neither of drivers nor of operating system,  just an application to record the file images from the hard disk to three or four blank DVD's.  After two years of normal home, non office use, and numerous problems with the NVIDIA graphics adapter drivers, some keyboard keys stopped functioning. The backspace key, the backslash key beneath it and lastly the numerical 7 key. The price of a spare part keyboard in Greece was surprisingly  at least 20 € higher than in Germany and was due to be delivered in more than a month! On the other hand, within  3 working days  I received a new keyboard for  a total of 49 € in Frankfurt am Main. The search for a nearby dealer via the HP search page  returned either businesses which were closed or relocated. Hopefully the online manual for disassembling the laptop was clear enough (although some extra screws were not displayed) to replace it on my own, without paying a visit to a technician, at no extra monetary or time cost.Thus, be ware, it counts from where one places one's spare part order!
All in all, the HP pavilions quality seems to deteriorate in time, the newer models are more fragile and easy to break down. All of them are vulnerable to overheating, which forces the laptop to power  off automatically, so as to prevent any further damage, but leaving the user wondering whether his work has been saved! That applies not only to places with a hot summer Mediterranean climate but also to milder climates, such as Germany. Finally, one matter of essence is the shorter duration of  the HP  one year guarantee, when compared to the competition which offers two years of warranty.

Saturday, 16 March 2013

Back to classicism? Zurück zur Klassik. Ein neuer Blick auf das alte Griechenland


 


Following the trend of discovering ancient Greece is a new exhibition in Frankfurt am Main. More details one can find here:

http://kulturfonds-frm.de/projekte/zurueck-zur-klassik-ein-neuer-blick-auf-das-alte-griechenland

One step further for those who have been taught some form of Greek at school, is visiting the available online museums of Greece and reading the literature about it:

http://www.latsis-foundation.org/default.asp?pid=92&la=1&libID=1

Nevertheless, people with no knowledge of Greek, ancient or modern, would also benefit by browsing the pictures of the exhibits, just to get a taste of the aesthetics.
Για  δε τους  απανταχού της γης ελληνόφωνους ή της ελληνικής παιδείας μετέχοντες, το υπουργείο παιδείας προσφέρει δωρεάν όλα τα σχολικά βιβλία εδώ.

Finally, the last step would be to see all these with one's naked eyes, by visiting Greece to enjoy the sunny weather and avail oneself of the particularly low hotel prices, attracting potential tourists worldwide.

Saturday, 3 November 2012

Comments on Oracle SOA Infrastructure Implementation certification Handbook (1Z0-451)) by Kathiravan Udayakumar



On the bright side, the text is of average quality written in American English. It is well organized, full of  helpful images though of the older JDeveloper 11.1.1.5 version, with minimal if any tutorials or hands on practice. The author explains clearly some points, such as  the different kinds of BPEL processes, synchronous, asynchronous, one way or bilateral, especially in the early chapters.

On the dark side, the text is full of spelling errors, sentences without a verb, some answers to exams questions (options are A or B only, but the correct answer is  given as C). Furthermore, there are technical errors spread everywhere; consider the example of what happens with already running instances when retiring or shutting down a composite application within the enterprise manager. I quote a sentence found in page 338: "29. b: Shutting down the composite will not terminate the running instance."   No SOA suite setup instructions are given, nor is any source code or errata,  available online. 


All in all, the book offers a spherical but not hands on introduction to the SOA suite. It makes a fairly good certification   primer. Nonetheless, whole topics such as complex event processing and many others are only mentioned in the exam questions, but not in the text itself. It seems the book  was written in haste; some professional reviewing and correction of the text, would be more than desirable!

Sunday, 16 September 2012

Processing BLOBs via the ImageServlet

In this post an alternative code version to the traditional ImageServlet  will be given, supplementing the one presented in the book named Oracle Fusion Developer Guide (p.409), by F.Nimphius and L.Munsinger and other official Oracle aces' and employees' blogs. This alternative version will use the  EJB 3 way to get rid of the surplus database definition hard coded in the doGet() method. As an epilogue, further criticism will be provided, against using that technique of obtaining jdbc connections to the database.

Here is the modified code, with the original straight jdbc code commented out:

package actionbazaar.view.servlet;


import actionbazaar.buslogic.PlaceItem;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.OutputStream;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import oracle.jbo.domain.BlobDomain;

import org.apache.log4j.Logger;


public class ImageServlet extends HttpServlet {
    private static final String CONTENT_TYPE = "image/jpg; charset=utf-8";
    @SuppressWarnings("compatibility:988932384557339885")
    private static final long serialVersionUID = 1L;
    private Logger logger = Logger.getLogger(this.getClass().getName());
   
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    }

    public void doGet(HttpServletRequest request,
                      HttpServletResponse response) throws ServletException,
                                                           IOException {
        response.setContentType(CONTENT_TYPE);
        Long itemId = new Long(request.getParameter("itemId"));
        if (logger.isDebugEnabled())
            logger.debug("itemId = " + itemId);
        try {
                Context context = new InitialContext();
                PlaceItem placeItem = (PlaceItem)context.lookup("ejb3inaction-Model-PlaceItem#actionbazaar.buslogic.PlaceItem");
                byte[] image  = placeItem.getImageByItemId(itemId);

            if (image != null) {
                BlobDomain bld = new BlobDomain(image);

                OutputStream os = response.getOutputStream();
                BufferedInputStream in =  new BufferedInputStream(bld.getBinaryStream());
                int b;
                byte[] buffer = new byte[10240];

                while ((b = in.read(buffer, 0, 10240)) != -1) {
                    os.write(buffer, 0, b);
                }
                os.close();
            } else {
                    if (logger.isDebugEnabled())
                        logger.debug("No  image exists yet for itemId: " + itemId);
                }
        } catch (NamingException e){
            e.printStackTrace();   
        }
        catch (IOException e){
            e.printStackTrace();   
        }
       /*
        Connection conn = null;


        try {
            Context ctx = new InitialContext();

//Datasource as defined in <res-ref-name> element of weblogic.xml
            DataSource ds =
                (DataSource)ctx.lookup("jdbc/ActionBazaarEJB3inActionDS");

            conn = ds.getConnection();
            PreparedStatement statement =
                conn.prepareStatement("SELECT IMAGE " +
                                      " FROM ITEMS" +
                                    " WHERE ITEM_ID= ? ");
            statement.setInt(1, new Integer(itemId));
            ResultSet rs = statement.executeQuery();

            if (rs.next()) {
                Blob blob = rs.getBlob("IMAGE");

                BufferedInputStream in =
                    new BufferedInputStream(blob.getBinaryStream());
                int b;
                byte[] buffer = new byte[10240];

                while ((b = in.read(buffer, 0, 10240)) != -1) {
                    os.write(buffer, 0, b);
                }
                os.close();

            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (conn != null) {

                    conn.close();
                }

            } catch (SQLException sqle) {
                sqle.printStackTrace();

            }

        }*/
      
    }

   }


Besides hard coding the database connection string and the SQL query too, using doGet() instead of init() to setup a database connection and destroy() to close it, is not widely considered a good idea. Thus, a newer version of the servlet code  will be most welcome, due to performance reasons as well. Presenting that code would go beyond the scope of such a post, so I am turning once again to the Oracle experts mentioned above for another alternative solution!

References

http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/
http://www.baigzeeshan.com/2010/09/store-images-in-blob-in-oracle-adf.html
http://ranajitsahoo.blogspot.gr/2008/04/how-to-display-content-of-blob-column.html
http://www.javaranch.com/journal/200601/JDBCConnectionPooling.html

Thursday, 19 April 2012

Farewell to ...ANT?

Following the articles by J.Stegeman and E.Biemond about building via ant scripts,  external to JDeveloper, one can quickly find out that the former does show how to create a war file, out of mostly .xml files, but not an ear; and the latter  misses on creating a war file out of the ViewController project! This article comes as supplement of both, showing how to jar the ejb3 model project,  to war the  ViewController, and lastly the external log4j library jar, assemble them in an ADF application ear and finally deploy to weblogic 10.3.4 application server.

First,  comes the model ant script:

<?xml version="1.0" encoding="UTF-8" ?>
<!--Ant buildfile runs only outside of JDeveloper-->
<!--Generated Apr 7, 2012 8:59:13 AM-->
<project name="Model" default="all" basedir=".">
  <property file="../Model/build.properties"/>
  <import file="../JDeveloperLibs/jdev-libs.xml"/>
  <path id="model.classpath">
    <pathelement location="classes"/>
    <pathelement location="../lib/log4j-1.2.15.jar"/>

    <path refid="JDeveloperLibs.library.EJB.3.0"/>
    <path refid="JDeveloperLibs.library.TopLink"/>
    <path refid="JDeveloperLibs.library.Java.EE.1.5.API"/>
    <path refid="JDeveloperLibs.library.WebLogic.10.3.Remote-Client"/>
    <path refid="JDeveloperLibs.library.ADF.Model.Runtime"/>
    <path refid="JDeveloperLibs.library.ADF.Model.Generic.Runtime"/>
    <path refid="JDeveloperLibs.library.Resource.Bundle.Support"/>
    <path refid="JDeveloperLibs.library.ADF.Common.Runtime"/>
    <!--path refid="JDeveloperLibs.library.Log4j-1.2.15.jar"/-->
    <path refid="JDeveloperLibs.library.Oracle.JDBC"/>
    <path refid="JDeveloperLibs.library.MDS.Runtime"/>
    <path refid="JDeveloperLibs.library.Oracle.XML.Parser.v2"/>
  </path>
  <target name="model.init">
    <tstamp/>
    <mkdir dir="${model.output.dir}"/>
    <mkdir dir="${model.deploy.dir}"/>
  </target>
  <target name="model.all" description="Build the project"
          depends="model.compile,model.copy"/>
  <target name="model.clean" description="Clean the project">
    <delete includeemptydirs="true" quiet="true">
      <fileset dir="${model.output.dir}" includes="**/*"/>
      <fileset dir="${model.deploy.dir}" includes="**/*"/>
    </delete>
  </target>
  <target name="model.compile" description="Compile Java source files"
          depends="model.init">
    <javac destdir="${model.output.dir}" classpathref="model.classpath"
           debug="${javac.debug}" nowarn="${javac.nowarn}"
           deprecation="${javac.deprecation}" encoding="UTF-8" source="1.6"
           target="1.6">
      <src path="../lib"/>
    </javac>
    <javac destdir="${model.output.dir}" classpathref="model.classpath"
           debug="${javac.debug}" nowarn="${javac.nowarn}"
           deprecation="${javac.deprecation}" encoding="UTF-8" source="1.6"
           target="1.6">
      <src path="${model.src.dir}"/>
    </javac>
  </target>
  <target name="model.copy" description="Copy files to output directory"
          depends="model.init">
    <patternset id="copy.patterns">
      <include name="**/*.gif"/>
      <include name="**/*.jpg"/>
      <include name="**/*.jpeg"/>
      <include name="**/*.png"/>
      <include name="**/*.properties"/>
      <include name="**/*.xml"/>
      <include name="**/*.ejx"/>
      <include name="**/*.xcfg"/>
      <include name="**/*.cpx"/>
      <include name="**/*.dcx"/>
      <include name="**/*.sva"/>
      <include name="**/*.wsdl"/>
      <include name="**/*.ini"/>
      <include name="**/*.tld"/>
      <include name="**/*.tag"/>
      <include name="**/*.xlf"/>
      <include name="**/*.xsl"/>
      <include name="**/*.xsd"/>
      <exclude name="**/persistence.xml"/>
        <exclude name="**/weblogic-ejb-jar.xml"/>
    </patternset>
    <copy todir="${model.output.dir}">
      <fileset dir="${model.src.dir}">
        <patternset refid="copy.patterns"/>
      </fileset>
      <fileset dir="../lib">
        <patternset refid="copy.patterns"/>
      </fileset>
    </copy>
    <copy todir="${model.output.dir}">
      <fileset dir="../Model/adfmsrc">
        <patternset refid="copy.patterns"/>
         <include name="../Model/adfmsrc/actionbazaar/DataControls.dcx"/>
      </fileset>
    </copy>
  </target>
  <target name="model.jar" depends="model.compile,model.copy">
    <jar destfile="${model.deploy.dir}/${model.jar.file}" >
      <fileset dir="${model.output.dir}">
        <include name="**/*.class"/>
        <include name="**/*.xml"/>
        <include name="**/*.dcx"/>
         <exclude name="**/*.java"/>
        <exclude name="**/**/actionbazaar/buslogic/client/**"/>
      </fileset>
      <fileset dir="${model.src.dir}/">
        <include name="META-INF/persistence.xml"/>
        <include name="META-INF/**"/>
        <include name="**/*.xml"/>
        <include name="**/*.dcx"/>
        <include name="**/*.properties"/>
        <exclude name="**/*.java"/>
        <exclude name="**/build.xml"/>
        <exclude name="**/build.properties"/>
      </fileset>
    </jar>
  </target>
</project>

Second, the userinterface or ViewController one:

<?xml version="1.0" encoding="UTF-8" ?>
<!--Generated Apr 7, 2012 9:24:35 AM-->
<project name="UserInterface" default="UserInterface.ear" basedir=".">
  <taskdef name="wldeploy"
           classname="weblogic.ant.taskdefs.management.WLDeploy"/>
  <taskdef resource="net/sf/antcontrib/antlib.xml">
    <classpath>
      <pathelement location="${ant.lib.folder}/lib/ant-contrib.jar"/>
    </classpath>
  </taskdef>
  <property file="../UserInterface/build.properties"/>
  <import file="../JDeveloperLibs/jdev-libs.xml"/>
  <import file="../Model/build.xml"/>
  <import file="Datasource.xml"/>
  <path id="UserInterface.classpath">
    <pathelement location="../Model/classes"/>
    <pathelement location="../lib/log4j-1.2.15.jar"/>
    <!--path refid="JDeveloperLibs.library.JSTL.1.2"/-->
    <path refid="JDeveloperLibs.library.JSTL.1.2.Tags"/>
    <path refid="JDeveloperLibs.library.JSF.1.2"/>
    <path refid="JDeveloperLibs.library.ADF.Faces.Runtime.11"/>
    <path refid="JDeveloperLibs.library.ADF.Common.Runtime"/>
    <path refid="JDeveloperLibs.library.JSP.Runtime"/>
    <path refid="JDeveloperLibs.library.ADF.DVT.Core.Runtime"/>
    <path refid="JDeveloperLibs.library.ADF.DVT.Faces.Runtime"/>
    <path refid="JDeveloperLibs.library.ADF.DVT.Faces.Databinding.Runtime"/>
    <path refid="JDeveloperLibs.library.ADF.Faces.Databinding.Runtime"/>
    <path refid="JDeveloperLibs.library.ADF.Page.Flow.Runtime"/>
    <path refid="JDeveloperLibs.library.ADF.Model.Runtime"/>
    <path refid="JDeveloperLibs.library.ADF.Controller.Runtime"/>
    <path refid="JDeveloperLibs.library.ADF.Web.Runtime"/>
    <path refid="JDeveloperLibs.library.MDS.Runtime"/>
    <path refid="JDeveloperLibs.library.EJB.Data.Control"/>
    <path refid="JDeveloperLibs.library.EJB.3.0"/>
    <path refid="JDeveloperLibs.library.TopLink"/>
    <path refid="JDeveloperLibs.library.Java.EE.1.5.API"/>
    <path refid="JDeveloperLibs.library.WebLogic.10.3.Remote-Client"/>
    <path refid="JDeveloperLibs.library.Resource.Bundle.Support"/>
    <path refid="JDeveloperLibs.library.ADF.Controller.Schema"/>
    <path refid="JDeveloperLibs.library.MDS.Runtime.Dependencies"/>
    <path refid="JDeveloperLibs.library.Commons.Beanutils.1.6"/>
    <path refid="JDeveloperLibs.library.Commons.Logging.1.0.4"/>
    <path refid="JDeveloperLibs.library.Commons.Collections.3.1"/>
    <path refid="JDeveloperLibs.library.ADF.DVT.Faces.Databinding.MDS.Runtime"/>
    <path refid="JDeveloperLibs.library.Oracle.JDBC"/>
    <path refid="JDeveloperLibs.library.Oracle.JEWT"/>
    <path refid="JDeveloperLibs.library.BC4J.Security"/>
    <path refid="JDeveloperLibs.library.ADF.Common.Web.Runtime"/>
    <path refid="JDeveloperLibs.library.Servlet.Runtime"/>
    <path refid="JDeveloperLibs.library.Resource.Bundle.Variable.Resolver"/>
    <path refid="JDeveloperLibs.library.Trinidad.Runtime.11"/>
    <path refid="JDeveloperLibs.library.Trinidad.Databinding.Runtime"/>
  </path>
  <target name="UserInterface.init">
    <tstamp/>
    <mkdir dir="${UserInterface.output.dir}"/>
    <mkdir dir="${UserInterface.deploy.dir}"/>
  </target>
  <target name="UserInterface.all" description="Build the project"
          depends="UserInterface.compile,UserInterface.copy"/>
  <target name="UserInterface.clean" description="Clean the project">
    <delete includeemptydirs="true" quiet="true">
      <fileset dir="${UserInterface.output.dir}" includes="**/*"/>
      <fileset dir="${UserInterface.deploy.dir}" includes="**/*"/>
      <fileset dir="${model.output.dir}" includes="**/*"/>
      <fileset dir="${model.deploy.dir}" includes="**/*"/>
    </delete>
  </target>
  <target name="UserInterface.compile" description="Compile Java source files"
          depends="UserInterface.init,model.compile">
    <javac destdir="${UserInterface.output.dir}"
           classpathref="UserInterface.classpath" debug="${javac.debug}"
           nowarn="${javac.nowarn}" deprecation="${javac.deprecation}"
           encoding="UTF-8" source="1.6" target="1.6">
      <src path="../lib"/>
    </javac>
    <javac destdir="${UserInterface.output.dir}"
           classpathref="UserInterface.classpath" debug="${javac.debug}"
           nowarn="${javac.nowarn}" deprecation="${javac.deprecation}"
           encoding="UTF-8" source="1.6" target="1.6">
      <src path="${UserInterface.src.dir}"/>
    </javac>
  </target>
  <target name="UserInterface.copy" description="Copy files to output directory"
          depends="UserInterface.init">
    <patternset id="copy.patterns">
      <include name="**/*.jspx"/>
      <include name="**/*.gif"/>
      <include name="**/*.jpg"/>
      <include name="**/*.jpeg"/>
      <include name="**/*.png"/>
      <include name="**/*.properties"/>
      <include name="**/*.xml"/>
      <include name="**/*.ejx"/>
      <include name="**/*.xcfg"/>
      <include name="**/*.cpx"/>
      <include name="**/*.dcx"/>
      <include name="**/*.sva"/>
      <include name="**/*.wsdl"/>
      <include name="**/*.ini"/>
      <include name="**/*.tld"/>
      <include name="**/*.tag"/>
      <include name="**/*.xlf"/>
      <include name="**/*.xsl"/>
      <include name="**/*.xsd"/>
      <include name="**/*.sso"/>
    </patternset>
    <patternset id="webfile.patterns">
      <include name="**/*.html"/>
      <include name="**/*.jspx"/>
      <include name="**/images/*.jpg"/>
    </patternset>
    <patternset id="webinf.patterns">
      <include name="WEB-INF/**/*.xml"/>
      <include name="**/WEB-INF/lib/*.jar"/>
    </patternset>
    <patternset id="library.patterns">
      <!--include name="**/glassfish.jsf_1.0.0.0_1-2-15.jar"/>
      <include name="**/glassfish.jstl_1.2.0.1.jar"/>
      <include name="**/javax.jsf_1.1.0.0_1-2.jar"/>
      <include name="**/wls.jsf.di.jar"/-->
      <include name="**/log4j-1.2.15.jar"/>
      <include name="**/adf-loc.jar"/>
      <exclude name="**/modules/javax.jsf_1.1.0.0_1-2.jar"/>
    </patternset>
    <copy todir="${UserInterface.output.dir}">
      <fileset dir="${UserInterface.src.dir}">
        <patternset refid="copy.patterns"/>
      </fileset>
      <fileset dir="../lib">
        <patternset refid="copy.patterns"/>
      </fileset>
    </copy>
    <copy todir="${UserInterface.output.dir}">
      <fileset dir="../UserInterface/adfmsrc">
        <patternset refid="copy.patterns"/>
      </fileset>
    </copy>
  </target>
  <target name="UserInterface.war"
          depends="UserInterface.copy,UserInterface.compile,model.copy">
    <war destfile="${UserInterface.deploy.dir}/${UserInterface.war.file}"
         webxml="${UserInterface.html.dir}/WEB-INF/web.xml">
      <zipfileset dir="${UserInterface.html.dir}">
        <patternset refid="webinf.patterns"/>
      </zipfileset>
      <zipfileset dir="${UserInterface.html.dir}">
        <patternset refid="webfile.patterns"/>
      </zipfileset>
      <zipfileset dir="${UserInterface.output.dir}" prefix="WEB-INF/classes">
        <exclude name=".data/**"/>
        <exclude name="**/*.cdi"/>
        <exclude name="**/build.xml"/>
        <exclude name="**/build.properties"/>
        <exclude name="**/*.java"/>
        <exclude name="**/log4j-1.2.15.jar"/>
        <exclude name="**/WEB-INF/temp/**"/>
      </zipfileset>
    </war>
  </target>
  <target name="UserInterface.ear" depends="UserInterface.war,model.jar">
    <mkdir dir="${UserInterface.deploy.dir}\META-INF"/>
    <mkdir dir="${UserInterface.deploy.dir}\lib"/>
    <copy todir="${UserInterface.deploy.dir}\lib">
      <zipfileset file="..\lib\*.jar" prefix="lib"/>
    </copy>
      <copy todir="${UserInterface.deploy.dir}\META-INF">
         <fileset dir="${project.src.dir}\META-INF" excludes="application.xml"
               includes="cwallet.sso">
        <patternset refid="copy.patterns"/>
      </fileset>
    </copy>
    <copy todir="${UserInterface.deploy.dir}\adf\META-INF">
      <fileset dir="..\.adf\META-INF">
        <patternset refid="copy.patterns"/>
      </fileset>
    </copy>
    <copy file="${UserInterface.deploy.dir}/${UserInterface.war.file}"
          todir="${UserInterface.deploy.dir}"/>
    <copy file="${model.deploy.dir}/${model.jar.file}"
          todir="${UserInterface.deploy.dir}"/>
    <ear basedir="${UserInterface.deploy.dir}"
         destfile="${UserInterface.deploy.dir}/${UserInterface.ear.file}"
         appxml="${project.src.dir}/META-INF/application.xml">
      <zipfileset dir="../JDeveloperLibs" prefix="lib">
        <patternset refid="library.patterns"/>
      </zipfileset>
          </ear>
  </target>
  <target name="UserInterface.autodeploy" depends="UserInterface.ear">
    <copy file="${UserInterface.deploy.dir}/${UserInterface.ear.file}"
          todir="${weblogic.home}/${weblogic.deploy.dir}"/>
  </target>
  <target name="UserInterface.deploy"
          depends="UserInterface.clean,UserInterface.ear,JDBC">
    <echo message="Start undeploying application..."></echo>
    <wldeploy action="undeploy" verbose="true" debug="true" name="${project}"
              adminurl="t3://${host}:${port}" user="${username}"
              password="${password}" targets="${target.server}"
              failonerror="false"/>
    <wldeploy action="deploy" verbose="true" debug="true" name="${project}"
              adminurl="t3://${host}:${port}" user="${username}"
              password="${password}" targets="${target.server}"
              failonerror="false"
              source="${UserInterface.deploy.dir}/${UserInterface.ear.file}"
              remote="true" upload="true"/>
    <echo message="END OF DEPLOYING APPLICATION"></echo>
  </target>
</project>


Finally, a word of caution: using ant nowdays seems to many people a waste of time or efford, when compared to modern solutions such as maven, well presented here by Dana Singleterry. As usual, one can find far more information, including source code, below.

REFERENCES
http://biemond.blogspot.com/2009/04/weblogic-jdeveloper-ant-tasks.html
http://www.oracle.com/technetwork/articles/adf/part4-098813.html
http://tompeez.wordpress.com/2012/02/07/jdeveloper-gem-debug-ant-scripts by Timo Hahn