Best flash websites that has animation and sound.
Award winning flash websites that has animation and sound.
Blog Entries

Dec 27, 2013
Mixing EJB and ADF Loading an Application Module from a Message Driven Bean: Read it here!

Jan 16, 2013
Illustrating Alice in Wonderland: Read it here!

Oct 25, 2012
Building a Storybook App: Read it here!

Aug 25, 2011
PhoneGap - Another way to build iOS Apps using html, css and javascript: Read it here!

May 9, 2011
OpenGL - Tips, Tricks and Tribulations: Read it here!

watch to rolex replica ensure that the pointer clear and good recognition, wear on omega replica uk their wrists more comfortable. Do not just see a watch replica watchworn on someone's wrist, or someone tell you that a watch is very fake rolex popular to buy.
Contact Info
an image
Miniville Media
Colorado Springs, CO 80923
Email: support@minivillemedia.com
Sister Reading

Mixing EJB and ADF

Loading  an Application Module from a Message Driven Bean:

Working with a mix of ADF and EJB technologies can sometimes be frustrating.   One specific instance is trying to use an ADF BC Application Module from a Message Driven Bean.  You can use  ‿span class=SpellE>Configuration.createRootApplicationModule(‿‿ to load the application module in the following way:

 

    public ApplicationModuleImpl getApplicationModule() {

        if(this.applicationModule == null) {

            try {

                String tp = "com.company.model.MobileService";

                String cfg = "MobileAppModuleLocal";

                applicationModule = Configuration.createRootApplicationModule(tp, cfg);

 

            } catch (Exception e) {

                e.printStackTrace();

                applicationModule = null;

            }

        }

        return applicationModule;

    }

 

Code similar to the above can be used in the Message Driven Bean and is presented well in many samples on the internet.  However you will still get the following errors if that is all you do:

 

javax.naming.NameNotFoundException: While trying to look up comp/env/jdbc/MobileDatabaseDS in‿o:p>

 

In order to avoid the above error you will need to add a “resource-ref‿to your ejb-jar.xml file that references in the data source.  It would look something like this:

 

<?xml version = '1.0' encoding = 'ISO-8859-1'?>

<ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"

         version="3.0" xmlns="http://java.sun.com/xml/ns/javaee">

    <enterprise-beans>

        <message-driven>

            <ejb-name>MobileTestBean</ejb-name>

            <ejb-class> com.company.MobileTestBean </ejb-class>

            <resource-ref>

                <res-ref-name>jdbc/MobileDatabaseDS</res-ref-name>

                <res-type>javax.sql.DataSource</res-type>

                <res-auth>Container</res-auth>

            </resource-ref>

        </message-driven>

    </enterprise-beans>

</ejb-jar>

 

I hope this is useful to someone.  It stumped me for a day or two until I until I found an obscure reference in a forum with a vague answer posted after the poster found their own solution.

Enjoy,
John Jumper

Design downloaded from free website templates.