EJB - Applet

I am trying to access a Business Component (deployed as a EJB on
9ias) using an Applet.
I used Jdev 9i to create a sample Jclient(JApplet) and it works
fine but only if it runs as an application.
Infact when I use applet I receive this message by Java Plug In
Console:
oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003:
The application pool, PrBC.DM, failed to checkout an application
module instance.
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout
(ApplicationPoolImpl.java:1143)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule
(ApplicationPoolImpl.java:1828)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:273)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:253)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:354)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:331)
     at pack_BC.AppletFunzionalita.init
(AppletFunzionalita.java:54)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
## Detail 0 ##
oracle.jbo.JboException: JBO-25222: Unable to create application
module.
     at
oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicat
ionModule(DefaultConnectionStrategy.java:63)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.createInstance
(ApplicationPoolImpl.java:1596)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.createNewInstance
(ApplicationPoolImpl.java:1582)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout
(ApplicationPoolImpl.java:1137)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule
(ApplicationPoolImpl.java:1828)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:273)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:253)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:354)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:331)
     at pack_BC.AppletFunzionalita.init
(AppletFunzionalita.java:54)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
## Detail 0 ##
javax.naming.NoInitialContextException: Cannot instantiate
class: com.evermind.server.rmi.RMIInitialContextFactory. Root
exception is java.lang.ClassNotFoundException:
java.io.IOException: open HTTP connection failed.
     at sun.applet.AppletClassLoader.getBytes(Unknown Source)
     at sun.applet.AppletClassLoader.access$100(Unknown
Source)
     at sun.applet.AppletClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native
Method)
     at sun.applet.AppletClassLoader.findClass(Unknown Source)
     at sun.plugin.security.PluginClassLoader.findClass
(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClassInternal(Unknown
Source)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Unknown Source)
     at com.sun.naming.internal.VersionHelper12.loadClass
(Unknown Source)
     at javax.naming.spi.NamingManager.getInitialContext
(Unknown Source)
     at javax.naming.InitialContext.getDefaultInitCtx(Unknown
Source)
     at javax.naming.InitialContext.init(Unknown Source)
     at javax.naming.InitialContext.<init>(Unknown Source)
     at
oracle.jbo.client.remote.ejb.ias.AmHomeImpl.initRemoteHome
(AmHomeImpl.java:75)
     at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.<init>
(AmHomeImpl.java:38)
     at
oracle.jbo.client.remote.ejb.ias.InitialContextImpl.createJboHome
(InitialContextImpl.java:17)
     at oracle.jbo.common.JboInitialContext.lookup
(JboInitialContext.java:72)
     at javax.naming.InitialContext.lookup(Unknown Source)
     at
oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicat
ionModule(DefaultConnectionStrategy.java:45)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.createInstance
(ApplicationPoolImpl.java:1596)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.createNewInstance
(ApplicationPoolImpl.java:1582)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout
(ApplicationPoolImpl.java:1137)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule
(ApplicationPoolImpl.java:1828)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:273)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:253)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:354)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:331)
     at pack_BC.AppletFunzionalita.init
(AppletFunzionalita.java:54)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
oracle.jbo.JboException: JBO-29000: Unexpected exception caught:
oracle.jbo.common.ampool.ApplicationPoolException, msg=JBO-
30003: The application pool, PrBC.DM, failed to checkout an
application module instance.
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:377)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:331)
     at pack_BC.AppletFunzionalita.init
(AppletFunzionalita.java:54)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
## Detail 0 ##
oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003:
The application pool, PrBC.DM, failed to checkout an application
module instance.
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout
(ApplicationPoolImpl.java:1143)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule
(ApplicationPoolImpl.java:1828)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:273)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:253)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:354)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:331)
     at pack_BC.AppletFunzionalita.init
(AppletFunzionalita.java:54)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
## Detail 0 ##
oracle.jbo.JboException: JBO-25222: Unable to create application
module.
     at
oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicat
ionModule(DefaultConnectionStrategy.java:63)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.createInstance
(ApplicationPoolImpl.java:1596)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.createNewInstance
(ApplicationPoolImpl.java:1582)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout
(ApplicationPoolImpl.java:1137)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule
(ApplicationPoolImpl.java:1828)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:273)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:253)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:354)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:331)
     at pack_BC.AppletFunzionalita.init
(AppletFunzionalita.java:54)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
## Detail 0 ##
javax.naming.NoInitialContextException: Cannot instantiate
class: com.evermind.server.rmi.RMIInitialContextFactory. Root
exception is java.lang.ClassNotFoundException:
java.io.IOException: open HTTP connection failed.
     at sun.applet.AppletClassLoader.getBytes(Unknown Source)
     at sun.applet.AppletClassLoader.access$100(Unknown
Source)
     at sun.applet.AppletClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native
Method)
     at sun.applet.AppletClassLoader.findClass(Unknown Source)
     at sun.plugin.security.PluginClassLoader.findClass
(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClassInternal(Unknown
Source)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Unknown Source)
     at com.sun.naming.internal.VersionHelper12.loadClass
(Unknown Source)
     at javax.naming.spi.NamingManager.getInitialContext
(Unknown Source)
     at javax.naming.InitialContext.getDefaultInitCtx(Unknown
Source)
     at javax.naming.InitialContext.init(Unknown Source)
     at javax.naming.InitialContext.<init>(Unknown Source)
     at
oracle.jbo.client.remote.ejb.ias.AmHomeImpl.initRemoteHome
(AmHomeImpl.java:75)
     at oracle.jbo.client.remote.ejb.ias.AmHomeImpl.<init>
(AmHomeImpl.java:38)
     at
oracle.jbo.client.remote.ejb.ias.InitialContextImpl.createJboHome
(InitialContextImpl.java:17)
     at oracle.jbo.common.JboInitialContext.lookup
(JboInitialContext.java:72)
     at javax.naming.InitialContext.lookup(Unknown Source)
     at
oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicat
ionModule(DefaultConnectionStrategy.java:45)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.createInstance
(ApplicationPoolImpl.java:1596)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.createNewInstance
(ApplicationPoolImpl.java:1582)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout
(ApplicationPoolImpl.java:1137)
     at
oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule
(ApplicationPoolImpl.java:1828)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:273)
     at
oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule
(SessionCookieImpl.java:253)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:354)
     at
oracle.jbo.uicli.mom.JUMetaObjectManager.createApplicationObject
(JUMetaObjectManager.java:331)
     at pack_BC.AppletFunzionalita.init
(AppletFunzionalita.java:54)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
My code in the applet java class is:
package pack_BC;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import oracle.jbo.*;
import javax.naming.*;
import oracle.jbo.uicli.mom.JUMetaObjectManager;
import oracle.jbo.uicli.binding.JUApplication;
import oracle.jbo.uicli.controls.*;
import oracle.jbo.uicli.jui.*;
import java.util.Hashtable;
public class AppletFunzionalita extends JApplet
// frame layout
private BorderLayout borderLayout = new BorderLayout();
// layout panel definition
private LYPanelFunzionalita layoutPanel;
// the statusbar
private JUStatusBar statusBar = new JUStatusBar();
* the default constructor
public AppletFunzionalita()
public void init()
try
// bootstrap application
java.util.Properties props = new java.util.Properties();
props.put(JboContext.USE_APPLET, this);
JUApplication app =
JUMetaObjectManager.createApplicationObject("PrBC.DM", props);
app.setErrorHandler(new JUErrorHandlerDialog());
app.setErrorHandlerActive(true);
layoutPanel = new LYPanelFunzionalita();
jbInit();
catch(Exception ex)
ex.printStackTrace();
public void stop()
_popupTransactionDialog();
public void destroy()
layoutPanel.getPanelBinding().getApplicationModule
().getTransaction().disconnect();
* the JbInit method
public void jbInit() throws Exception
// frame layout
this.getContentPane().setLayout(borderLayout);
this.getContentPane().add(layoutPanel, BorderLayout.CENTER);
statusBar.setModel(JUStatusBar.getModelInstance
(layoutPanel.getPanelBinding(), statusBar));
this.getContentPane().add(statusBar, BorderLayout.SOUTH);
public static void main(String [] args)
// run this frame
JFrame frame = new JFrame();
frame.setSize(300, 400);
JApplet applet = new AppletFunzionalita();
frame.getContentPane().add(applet);
applet.init();
applet.start();
Dimension screenSize = Toolkit.getDefaultToolkit
().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height)
frameSize.height = screenSize.height;
if (frameSize.width > screenSize.width)
frameSize.width = screenSize.width;
frame.setLocation((screenSize.width - frameSize.width) / 2,
(screenSize.height - frameSize.height) / 2);
frame.setVisible(true);
private void _popupTransactionDialog()
if (layoutPanel.getPanelBinding().getApplicationModule
().getTransaction().isDirty())
Object [] options = {"Commit", "Rollback"};
int action = JOptionPane.showOptionDialog(null, "How do
you want to close the transaction.", "Transaction open",
JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE,
null, options, options[0]);
switch (action)
case JOptionPane.NO_OPTION:
case JOptionPane.CLOSED_OPTION:
layoutPanel.getPanelBinding().getApplicationModule
().getTransaction().rollback();
break;
case JOptionPane.YES_OPTION:
default:
layoutPanel.getPanelBinding().getApplicationModule
().getTransaction().commit();
break;

same problem

Similar Messages

  • Question for Steve Muench - ADF/EJB & Applets?

    Steve or anyone who can help - Do you have any sample demo that can demonstrate how to take advantage of ADF caching technology on the server, or an EJB solution integrated with an applet in a web application?
    It is kind of late in the game, because we are about to roll out an application in our company, nevertheless we are still researching a better way for handling tremendous amount of data by our applet. We are using F1 Formula engine (spreadsheet like tech) in our applet. But, we have severe performance problems, especially in our remote locations trying to load thousands of rows in the applet and on top of that do all kinds of formatting and Excel like functionality in the applet grid at run time.
    We are looking for a way to integrate ADF or EJB caching solution with our applet, so that we can cache the client data on the app server if possible, in order to improve performance.
    Any guidance, suggestion and help is very much appreciated.
    Thanks,
    [email protected]

    Hi,
    my recommendation would be to use JavaWeb Start with BC deployed as EJB to the Application Server. This way you have a real client installation and don't need to download the Applet classes all the time (and JClient, assuming you use JClient, comes with a couple of libraries slowing down the initial application startup). Using EJB on the middle tier allows you to use batch mode, which reduces the number of roundtrips between the client and the server. Note that the default implementation is synchronous, which is more chatty.
    Frank

  • EJB , Applet , OAS 4.0.8.1

    What are the steps to call an EJB component
    through an applet running in Netscape
    Browser ?

    The steps are really no different than
    calling an EJB from any other piece of
    Java code.
    1. Include the the EJB Home and Remote classes created in your applet project.
    2. Use the Home interface class to create
    an instance of your EJB.
    3. Use the Remote interface class
    to interact with your EJB.
    For more info, please see the EJB online demo: http://technet.oracle.com/products/jdev/info/jdevwt/wt_ejb/s000.html
    John @ Oracle JDeveloper Team

  • Applet for EJB on Orcale application server

    I developed Oracle Application server deployed EJB. Then I developed Applet client for that EJB. Everything works fine when I use applet viewer for that applet. But when I try to do same from the Netscape (4.7) or IE5 problems occurs. First I try netscape alone. Netscape uses JDK 1.1.5. Applet created initial context, and found EJB on the server, but could not do anything (CORBA MArshall exception occured, and no completed string returned). Then I installed Java Plug in 1.2.2 and tried everything again. Now I always get naming exception. Initial context is created, but client cannot find EJB on the server ( [Root exception is org.omg.CORBA.NO_IMPLEMENT: minor code: 0 completed: No]javax.naming.ServiceUnavailableException at oracle.oas.jndi.oas.SecCosNamingContext.resolve(SecCosNamingContext.java:265) at oracle.oas.jndi.oas.BeanContext.lookup(BeanContext.java:328) .........
    occurs). Does someone has some expiriences or can help?
    I can run the application but when it comes to applet , its not working.
    further can the EJB applet run over Java 1.2 plugin?
    null

    yeah, but appletviewer is not the solution, I am using jdeveloper 3 , OAS4081. I need to put the client on applet. The documentation says it will work. but the problem remains. I have lareday spent more then 40 hours to find a solution but it won't work.
    Jayakumar,If you find a solution can you let me know also. my mail is [email protected]

  • How to run ejb (JServer) client in web browser

    Did anyone try the ClubMed example under $ORACLE_HOME/javavm/demo/examples/ejb/applets/ClubMed?
    Does anyone know how to run the applets in latest Netscape and/or IE browsers? What do I need to do to set up security, etc. Thanks.
    null

    Forms client side is a Java applet, so it needs a Web browser to run. Anyway you could try to run it with the Java Web Start.
    <p>See this Jan Carlin entry.</p>
    Francois

  • Oracle 8i bug report

    Dear OTN people,
    when playing around with Oracle 8i EE for Linux I have found
    several problems:
    The following bugs/problems I have encountered are:
    I have already applied sucessfully the patch to 8.1.5.0.1
    1. $ORACLE_HOME/bin/osfind is a SPARC executable
    2. $ORACLE_HOME/bin/osagent is a SPARC executable
    3. $ORACLE_HOME/bin/locserv is a SPARC executable
    4. $ORACLE_HOME/bin/vbj references "whence" which is not
    available on Linux
    5. alert files always contain: "Load indicator not supported by
    OS!"
    6. when trying ejb samples you cannot use jdk 1.1.7 or above
    since oracle jvm seems to test for the version number: this
    should
    at least be documented. Better would be to remove this check.
    Java is Java, and a jdk 1.1.6 and 1.1.7 should be compatible in
    terms of functionality. I know this is not reality...
    7. the THREADS option for all java tools should be configurable
    centrally, and it should not only be green and native
    but also be "empty", so one can use IBM jdk1.1.6 which is VERY
    good. It simply does not accept -native or -green since it
    is a real native implementation. I will send a request to IBM for
    adding dummy options as well...
    8. It is annoying that some java tools require JRE wheras some
    require JDK (rt.jar vs. classes.zip). Could you unify this?
    9. Please do not hardcode the jre/jdk directories. Many
    distributions do not have java in /usr/local. Make it
    installation configurable. It could even be detected
    automatically via "which jre" ;-)
    10. /javavm/demo/examples/ejb/applets/EJBClubMed example give
    this error:
    clubMedClient/ClubMedClient.java:18: Class
    netscape.security.PrivilegeManager not found in import.
    import netscape.security.PrivilegeManager;
    Having those problems I am not able to test the corba stuff
    supplied in the javavm/demo directory.
    I really appreciate very much Oracle's commitment to Linux, so
    please go ahead and fix those problems to make all your users
    happy ;-)
    Greetings
    Marcus
    null

    Single quotes must be doubled in SQL statements to be legal. I've filed Bug# 3574900 for us to do a better job on fixing up this case in the future, but there's an easy workaround idea for now.
    If you don't want the user to have to know/remember this, you could override the getViewCriteriaClause() method in your ViewObjectImpl class, and "fix up" the view criteria attributes to double-up occurrences of single apostrophe's before returning super.getViewCriteriaClause().
    Here's a quick web log entry on it with some sample code:
    http://radio.weblogs.com/0118231/2004/04/16.html#a276

  • JDBC thin error

    i think i am so close to getting this to work, but another error came out of nowhere.
    my java program finds the oracle jdbc drivers but an error saying :
    SQLException:java.sql.SQLException:Message file 'oracle.jdbc.dbaccess.Messages' is missing.
    i have looked in the dbaccess folder and there are two files names Messages one .class and one .properties
    i would be very grateful if someone knew what this means and what I need to do.

    fyi
    a word of "constructive" advice ...
    please post details ...
    some of the relevant details in your environment include :
    jdk version in the client application
    jdbc driver version number
    jdbc type of connection or the connection string(blank out the userid and password)
    rdbms version
    application type -- ejb - applet - corba-command line application - servlet - java stored proc or java server pages, etc.
    the entire error message
    the entire java stack trace or first 10 or so lines of it
    and most importantly
    what you are attempting to do when the error occurs .. possibly a piece of code that you have isolated the problem to ...
    basically you've provided no information for anyone to try to help you on ..
    trust me -- providing details really works ...
    1) people on forums don't want to waste THEIR time chasing after your information .. you'll go unanswered
    2) you're asking people to gaze into a crystal ball and guess what you're doing and what went wrong!! A WASTE OF ENERGY and TIME !!
    it's just my two cents worth !!
    null

  • SUN VS Microsoft supporting tools

    hi Guys ,
    I have a question ?How do you find Sun development tools advantages and disadvantages and Microsoft .Just help me to fill up this pls.
    Mircosoft supporting tools
    Advantages
    1.FrontPages - very fast development process with support of template and GUI menu .I can build a web site with database engine within 5 minutes using template.I just click,next ,click and click and done.
    2.Interdev - A powerful tools for Web Debuging
    Disadvantages - too much of predefine API and tied to OS so blue screen or unknown bugs possibilities higher .
    SUN supporting tools
    Advantages
    1.Forte - ??
    2.Borland - ??
    Disadvantages
    1.Slow and no template provided .Difficults to publish to Apache server.
    One more question - any JSP/Servlet web debuging software that can provide me easy debugging on running web site so i can debug line by line just like Visual Studio(Visual Basic ) and press F8 to debug line by line with the value.

    hi
    u can use Visual Age for java which is similiar to visual studio.
    Products has facility of wizards for development virtually major areas in java jsp,servlets,EJB,Applets, swing etc..
    that too using wizards...
    In fact IBM has come up with Websphere Studio Application Developer which is more powerful tool than visual age and visual studio.

  • J2ME "instead of" J2SE?

    At our company we are thinking about a system that involves slimmed down PCs mounted in trucks. (There will also be an fleet management center at the companies head office.)
    Approx PC spec; 200 - 300 MHz CPU, no harddisk but flash RAM maybe 512 MB, 10 inch TFT color screen. Keyboard and probably a CD/DVD reader. OS; Win CE, WinXP Embedded or Linux.
    A map/navigation application would run on these. Another application will handle forms (an AWT-GUI will probably do).
    We hope to find a commercial map app to install.
    I would like to develop the other app in Java but the PC bulider didn't like the idea of runnig J2SE on that limited platform.
    How about developing in J2ME? Pros and cons?
    Can I just download J2ME from Sun, develop and run as I'm used to with J2SE? If we are running the JRE on Windows. Do we have to implement or port J2ME ourselfs.
    I have developed in J2SE (Swing, Java 2D) and a little in J2EE (JDBC, EJB, Applets).

    The original question is very interesting: should a mobile app move from J2SE to J2ME?
    The answer is not simple at this time because the specs are evolving fast.
    GUI features and h/w and OS portability is definitively a current factor but may not be important for many applications. A corporate application can usually select a set of hardware, OS and Java runtimes to support so all you have to do is make sure that your platform satisfies your business requirements and not the business requirements of the rest of the world.
    Mobile GUI in J2ME is being improved by some new specs in progress and to be implemented probably in runtimes shipped in 2005.
    TCP/IP features are now fully supported by MIDP2 (the socket and server socket are optional in the spec bu the all MIDP2 runtimes being shipped today support them).
    Floating-point arithmetic is now supported by the underlying spec., CLDC 1.1; it was not supported by CLDC 1.0.
    New specs have been proposed recently and are being supported by new J2ME runtimes: for example Wireless Messaging API (JSR-120, WMA) and Mobile Media API (JSR-135, MMA).
    The set of mobile Java specs including MIDP are being regrouped by the JTWI spec: Java Technology for Wireless Industry (JSR-185).
    The way to go in today's fast changing mobile technologies is CLDC and the specs supported by it:
    -      Connected Limited Device Configuration (CLDC)
    -      Mobile Information Device Profile (MIDP)
    -      Java Device Test Suite
    -      Information Module Profile (JSR-195)
    -      Java Technology for Wireless Industry (JSR-185) <<<<<<<<<<<<<<<<<<<<<<<<
    -      Wireless Messaging API (JSR-120)
    -      Mobile Media API (JSR-135)
    -      Location API for J2ME (JSR-179)
    -      SIP API for J2ME (JSR-180)
    -      Security and Trust Services API for J2ME (JSR-177)
    -      Mobile 3D Graphics (JSR-184)
    -      J2ME Web Services (JSR-172)
    -      Bluetooth API (JSR-82, Motorola, Java Partner Site)
    It looks like very soon if not already now, J2ME will have more features than J2SE for most interconnected mobile applications. For example, today, a MIDP2 device can install a new J2ME application over-the-air (OTA), something that cannot be done easily by J2SE, I believe. All the user has to do to install OTA is to browse to the web page with her mobile device that contains an html anchor () to the jad file referencing the application (a MIDlet) and the rest is automatic and the programmer has nothing to write to get this feature.
    serge

  • GUI design ideas/suggestion required??

    Dear forum,
    I am planning to design a GUI based solution with the following criteria
    a) It will be run on a windows based system
    b) Tables and other data will be there on many linux nodes. It can be in the form of sql tables, files etc
    c) I need graphical display of these nodes on the GUI application
    d) Additionally a map (geographical) display of modes with topology discovery is required.
    I am at the start of doing this project, wanted to know which java technology to use like Swing or AWT or EJB or J2EE.
    I dont have any specific criteria as such it should be a web based solution or not. Even a stand alone solution such as clicking an ".exe" for launching this GUI on windows should be fine.
    Let me also give you the probable requirements (= API's) sql, file ftp'ing etc
    Waiting for your early reply.
    -Muni

    Oh I am sorry if my question was very bossy ;-(
    The problem is I have gone through all tutorials of Java starting from Swing, AWT, EJB, Applet and so on. And I am confused which one to use as such.
    Also this type of application or program I have used extensively from other vendors which looks quite good!

  • EJB 3.0 - Communicate an Applet with a Session Bean

    Hello
    I'm developing an EJB 3.0 app (eclipse and glassfish tools bundle), and I have an applet that has to use remote session beans.
    QUESTION: Is it possible for the applet to connect to EJB?
    QUESTION: By creating a J2EE application client project, can I use @EJB annotations to inject the session bean directly to the applet, avoiding the JNDI lookup?
    (since I imagine that the anwser to the second one is NO, I do the following consideration)
    Given an application client project, I imagine that this application can run remotely on a client machine/JRE. Then this application can use Annotations/injection facilities whenever it runs on a J2EE client container (which I assume consists of a set of libraries provided by the application server vendor, Glassfish in that case). Could this application be deployed using Java Web Start? If so, why can't it be deployed as an applet? (both options run in a client JRE, don't they?).
    QUESTION: In either case (applet or JWS), how do I have to package the JAR file (using Eclipse) so that it contains the needed libraries for accessing the EJB? Which are those libraries?
    At the time being, I'm trying to implement a sample application that follows the "Applet doing JNDI lookup" approach. I have:
    - an EAR project
    - an EJB project (containing an Entity Bean and a Stateless Session Bean with a @Remote interface)
    @Remote
    public interface HelloRemote {
         public String hello(String name);
    @Stateless
    public class Hello implements HelloRemote {
         @Override
         public String hello(String name) {
              return "Hello "+name+"!!";
    }- an Application Client project (containing the applet code):
    public class ClientApplet extends JApplet {
         public void init(){     
              try {
                   Context jndiContext = getInitialContext( );
                   HelloRemote server = (HelloRemote) jndiContext.lookup(HelloRemote.class.getName());
                   setContentPane(new JLabel(server.hello("Gerard")));
              } catch (NamingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         private Context getInitialContext() throws NamingException{
              Properties props = new Properties();
              props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
              props.setProperty("org.omg.CORBA.ORBInitialHost", "myhost");
              props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
              return new InitialContext(props);
    }- a static web project (with a sample web page that contains the applet object the corresponding applet JAR file)
    I tried to export the Application Client project as an "application client JAR", in the hope that the java EE libraries bundled with glassfish (listed as libraries of this project) would be packaged too.
    No success, so now I'll try to copy all the JAR files (one by one) into the +\WebContent\+ folder of the Web Project, and add references to each of them in the archive="" attribute of the +<applet>+ HTML tag. Although this might work, I suspect that I am missing the good/easy way of doing it. Any suggestions?
    Thanks in advance,
    Gerard
    Edited by: gsoldevila on May 6, 2009 7:09 AM

    An Applet can communicate with an EJB via JNDI lookup but I would (personally) use an intermediate Servlet to handle this. Client to Servlet communication is http whereas to ejb is iiop - which might be blocked.
    Injection only works in managed classes (EJB, Servlet, Listeners..) and an Application Client main class. So yes you could use an app client for handling resource injection.
    m

  • Calling EJB from an applet in 9iAS Release 2?

    Hello!
    In 9iAS Release 1 it is not so easy to call an EJB from an applet. First the applet needs special privileges and then the applet starts only once. The cause of problem is the implementation of ormi.
    Will 9iAS Rel. 2 support Applets calling EJBs?

    Jeff,
    I am also trying to make an applet client for an EJB deployed to OC4J.
    I modified the java2.policy file as you suggested, but when I tried to run my applet, I
    got the following error:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission tunneling.shortcut read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at java.lang.Boolean.getBoolean(Unknown Source)
         at com.evermind.server.rmi.RMIInitialContextFactory.<clinit>(RMIInitialContextFactory.java:34)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at its.fnd.ejb.EJBHomeFinder.getHomeObject(Unknown Source)
         at its.fnd.flight.ejb.EJBFlightFactory.<init>(Unknown Source)
         at its.fnd.flight.FlightFactory.<init>(FlightFactory.java:97)
         at EJBApplet.jbInit(EJBApplet.java:47)
         at EJBApplet.init(EJBApplet.java:36)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I am using OC4J (stand-alone) version 9.0.2.0.0 on Solaris 7 and Microsoft Internet Explorer
    5.0 with the java 1.3.1 plug-in.
    Here is the applet code that I use to lookup the EJB home interface:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
    props.put(Context.PROVIDER_URL,"ormi://host:6666/app");
    props.put(Context.SECURITY_PRINCIPAL,"admin");
    props.put(Context.SECURITY_CREDENTIALS,"password");
    Context ctxt = new InitialContext(props);
    Object homeObj = ctxt.lookup("my_bean");
    MyBeanHome home = PortableRemoteObject.narrow(homeObj, MyBeanHome.class);
    The HTML page with the <applet> tag is a static HTML page that is part of OC4J's default
    web application. The applet class file is located in a subdirectory of the default-web-app
    directory. Here is the HTML page...
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    HTML Test Page
    </TITLE>
    </HEAD>
    <BODY>
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="580" height="450" name="EJBApplet" align="middle" alt="Loading EJBApplet ...">
    <param name="java_code" value="EJBApplet">
    <param name="java_codebase" value="/tests">
    <param name="java_archive" value="xerces.jar,ejb.jar,oc4j.jar,jaas.jar"/>
    <param name="java_type" value="application/x-java-applet;version=1.3">
    <param name="java_scriptable" value="true">
    <table cellpadding="1" bgcolor="#FFFFFF" width="580" height="450">
    <tr><td>
    This is a place for an APPLET.<br>Your browser doesn't support the correct applet java plug-in.<br><br>You can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="/classes/3rdparty/j2re-win-plug-in.exe">Click here to install plug-in.</a><br><br>Or if you have an Internet connection you can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="http://java.sun.com/products/plugin/1.3/plugin-install.html">Click here to install plug-in from Internet.</a><br><br>You can call your System Administrator for assistance.</td></tr>
    </table>
    </object>
    </BODY>
    </HTML>
    I have searched the Internet, and the documentation, and tried several, different things,
    but I can't get it to work.
    Any and all help will be greatly appreciated.
    Thanks,
    Sofia.

  • Applet EJB Coomunication

    Hi,
    I am trying the applet ejb communication .
    I am very comfortable if I do the same with applet servlet communication but the problem is with the applet calling the ejb directly, i mean to say that can applet can directly lookup the EJB ?
    I had tried on the intranet but we are supposed to give the HOme and remote files to the client also the ejb.jar has to be given as the JVM of the clinet doesnot have the javax.ejb package and all relevant pacakages are to be given,
    There is no meaning of making the client EJB compitable.
    Also what about the security ?
    So can any body help me how to do the same.
    Thanks in advance.
    Milind

    Remove ur applet ejb communication by
    applet to servlet/serverside class then from that servlet/serverside clas to ejb..
    This concept is done by a pattern called 'business delegate'.
    By using this approach u need not give the stub and skull to the front end side (jsp/applet/or anything like that).
    just call the servlet/class from the applet by keeping that class as passover and thereby the lookup details are moved to that servlet/class that could resolve your problem..
    does my answer make any sense to u..

  • Accesing an EJB from an Applet

    Hello,
    I've published my first EJB to Oracle 8i, and when I use a
    standalone java application as a client I have no problems.
    But when I try to access with an Applet, the Java console shows:
    javax.naming.NotContextException:
    retvalentin09.cedetel.tel.uva.es:2481:ORCL/test/MyEJBRemote
    The code I use to connect to the EJB is the same as in the
    standalone application:
    Hashtable env = new Hashtable();
    System.out.println("Inicializando entorno...");
    env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    env.put(Context.SECURITY_PRINCIPAL, "valentin");
    env.put(Context.SECURITY_CREDENTIALS, "valentin");
    env.put(Context.SECURITY_AUTHENTICATION,
    ServiceCtx.NON_SSL_LOGIN);
    System.out.println("Inicializado");
    try{
    Context ic = new InitialContext(env);
    System.out.println("Contexto inicial creado");
    MyEJBHome home = (MyEJBHome)
    ic.lookup("sess_iiop://retvalentin09.cedetel.tel.uva.es:2481:ORCL
    /test/MyEJBRemote");
    System.out.println("Obtenido home Interface");
    try{
    try{
    MyEJBRemote holaBean = home.create(); // create a
    bean instance
    System.out.println("Obtenida referencia a EJB");
    System.out.println("Resultado: "+holaBean.DimeHola());
    } catch (java.rmi.RemoteException
    RE){System.out.println("Excepcion remota: "+RE);}
    }catch (javax.ejb.CreateException
    CE){System.out.println("Excepcion de creacion: "+CE);}
    }catch (javax.naming.NamingException
    nE){System.out.println("Excepcion de nombrado: "+nE);}
    System.out.println("Finalizado");
    What is going wrong? I use Java Plugin 1.2.2 in the
    navigator, perhaps that is the problem.
    I've tried to compile the applet in JDeveloper 2.0 with JDK
    1.1.7, but the Netscape Communicator throws Security Exceptions
    (I think the JVM of the navigator is 1.1.5), and it happens the
    same with Internet Explorer.
    I've tried to compile the applet in JDevelper 2.0 whit JDK 1.2,
    and in both Communicator and Explorer the Java Console shows this
    messages:
    Java(TM) Plug-in: Version 1.2.2.pu
    Using JRE version 1.2.2
    User home directory = C:\WINNT\Profiles\Administrador
    Proxy Configuration: Manual Configuration
    Proxy: http=proxy.uva.es:80
    Proxy Overrides:
    JAR cache disabled.
    Inicializando entorno...
    Inicializado
    Contexto inicial creado
    Excepcion de nombrado: javax.naming.NotContextException:
    retvalentin09.cedetel.tel.uva.es:2481:ORCL/test/MyEJBRemote
    Finalizado
    I would appreciate if somebody could help me, as it is very
    urgent.
    Thanks in advance
    Valentin
    null

    Hi
    Oracle8i comes with set of samples. One of sample is accessing an
    EJB from applet. check out demo.tar/demo.zip file
    $ORACLE_HOME/javavm/demo directory.
    You will find it useful.
    regards
    raghu
    Valentin Alonso (guest) wrote:
    : Hello,
    : I've published my first EJB to Oracle 8i, and when I use a
    : standalone java application as a client I have no problems.
    : But when I try to access with an Applet, the Java console
    shows:
    : javax.naming.NotContextException:
    : retvalentin09.cedetel.tel.uva.es:2481:ORCL/test/MyEJBRemote
    : The code I use to connect to the EJB is the same as in the
    : standalone application:
    : Hashtable env = new Hashtable();
    : System.out.println("Inicializando entorno...");
    : env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    : env.put(Context.SECURITY_PRINCIPAL, "valentin");
    : env.put(Context.SECURITY_CREDENTIALS, "valentin");
    : env.put(Context.SECURITY_AUTHENTICATION,
    : ServiceCtx.NON_SSL_LOGIN);
    : System.out.println("Inicializado");
    : try{
    : Context ic = new InitialContext(env);
    : System.out.println("Contexto inicial creado");
    : MyEJBHome home = (MyEJBHome)
    ic.lookup("sess_iiop://retvalentin09.cedetel.tel.uva.es:2481:ORCL
    : /test/MyEJBRemote");
    : System.out.println("Obtenido home Interface");
    : try{
    : try{
    : MyEJBRemote holaBean = home.create(); // create a
    : bean instance
    : System.out.println("Obtenida referencia a EJB");
    : System.out.println("Resultado:
    "+holaBean.DimeHola());
    : } catch (java.rmi.RemoteException
    : RE){System.out.println("Excepcion remota: "+RE);}
    : }catch (javax.ejb.CreateException
    : CE){System.out.println("Excepcion de creacion: "+CE);}
    : }catch (javax.naming.NamingException
    : nE){System.out.println("Excepcion de nombrado: "+nE);}
    : System.out.println("Finalizado");
    : What is going wrong? I use Java Plugin 1.2.2 in the
    : navigator, perhaps that is the problem.
    : I've tried to compile the applet in JDeveloper 2.0 with JDK
    : 1.1.7, but the Netscape Communicator throws Security Exceptions
    : (I think the JVM of the navigator is 1.1.5), and it happens the
    : same with Internet Explorer.
    : I've tried to compile the applet in JDevelper 2.0 whit JDK 1.2,
    : and in both Communicator and Explorer the Java Console shows
    this
    : messages:
    : Java(TM) Plug-in: Version 1.2.2.pu
    : Using JRE version 1.2.2
    : User home directory = C:\WINNT\Profiles\Administrador
    : Proxy Configuration: Manual Configuration
    : Proxy: http=proxy.uva.es:80
    : Proxy Overrides:
    : JAR cache disabled.
    : Inicializando entorno...
    : Inicializado
    : Contexto inicial creado
    : Excepcion de nombrado: javax.naming.NotContextException:
    : retvalentin09.cedetel.tel.uva.es:2481:ORCL/test/MyEJBRemote
    : Finalizado
    : I would appreciate if somebody could help me, as it is very
    : urgent.
    : Thanks in advance
    : Valentin
    null

  • Applets to EJB Cluster

    Hi,
              Is the following true? If so what is the recommended way to load balance
              EJB calls from applets?
              Since applets (not signed) can only create a connection to the server they
              where downloaded from, I can not call EJBs that reside in a WL cluster.
              These EJBs may reside on a different machine other than the one the applet
              was downloaded from.
              Can I solve this by installing a Web Server on each of the machines in the
              cluster and have the applets stick the one machine? What I do not like
              about this scheme is that I loose the dynamic load balancing features of WL.
              Any help will be appreciated,
              Assaf Pazner
              

                   The WLS RJVM scheme supports routing / session concentration of
              request. Thus, using clustered services within the applet security
              model or over a firewall should work fine. The server that the applet
              talks to will route requests to the appropriate server within the
              cluster.
                                            - Mike
              Assaf Pazner wrote:
              >
              > Hi,
              >
              > Is the following true? If so what is the recommended way to load balance
              > EJB calls from applets?
              >
              > Since applets (not signed) can only create a connection to the server they
              > where downloaded from, I can not call EJBs that reside in a WL cluster.
              > These EJBs may reside on a different machine other than the one the applet
              > was downloaded from.
              >
              > Can I solve this by installing a Web Server on each of the machines in the
              > cluster and have the applets stick the one machine? What I do not like
              > about this scheme is that I loose the dynamic load balancing features of WL.
              >
              > Any help will be appreciated,
              > Assaf Pazner
              

Maybe you are looking for