Lcdui and midlet classes

hi-
it seems that after i downloaded and installed midp4palm and j2me_cldc 1.0.2 the lcdui and midlet classes are both missing. i browsed to the cldc folder on my computer and checked in all the subfolders there. in the javax/microedition/ folder, only io is there, not lcdui and midlet also. did i miss something in downloading?
help?
thanks
brandon

Midp4palm is midp ... hum... for Palm !
If you want the midp's API, you need to download a
reference implementation for your desktop at :
http://java.sun.com/products/midp/
otherwise, you can download the J2ME wireless toolkit
wich come with a midpapi zip file.Ok. I'm starting to catch on, what I've been looking for and can't seem to find is the documentation for ALL of the classes that are included / available in the MIDP. It seems to me that Sun is making this more confusing than it should be. I understand their desire to modularize (is that a word?) such that you pick the parts that are appropriate for you particular mobile device, but they need to do a better job of packaging. IMHO.

Similar Messages

  • Downloaded Java ME SDK 3.0 but mising lcdui and midlet packages

    Hi,
    I have just started looking into J2ME and have downloaded and installed the SDK 3.0. i have tried also to setup a sample application from the Java site which requires imports of..
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;but when compiling it says the packages do not exist. I have searched the source code and they are not there, do i need to install anything else to get these to work?
    Thanks in advance
    Graham

    Note: This thread was originally posted in the [CLDC and MIDP|http://forums.sun.com/forum.jspa?forumID=76] forum, but moved to this forum for closer topic alignment.

  • Blackberry controls and midlets

    Midlet meets blackberry let the battle for who can use the escape key begin!
    If you're having trouble mapping keys from the blackberry to your midlet..this will definitely help you!
    in this post I go over: Adding menu items to the blackberry menu, and gaining access to undetected keys such as the Escape Key.
    First of all, that **** menu how do I add stuff to it?
    Well...that in itself is a hastle but lemme just say, that menu
    is in a nutshell a CommandListener. Same freakin menu. Later on in this post I show how to map the escape key..and i'm guessing pretty much every other key...of course
    the only key I ever had a problem with was the EscapeKey/HangUpKey
    Anyways if you want that BlackBerry Menu Code here
    * MIDletDemo.java
    * Copyright © 1998-2008 Research In Motion Ltd.
    * Note: For the sake of simplicity, this sample application may not leverage
    * resource bundles and resource strings.  However, it is STRONGLY recommended
    * that application developers make use of the localization features available
    * within the BlackBerry development platform to ensure a seamless application
    * experience across a variety of languages and geographies.  For more information
    * on localizing your application, please refer to the BlackBerry Java Development
    * Environment Development Guide associated with this release.
    import java.util.*;
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.lang.*;
    * An Example MIDlet.
    * The application must extend the MIDlet class to allow the application management
    * software to control the MIDlet.
    public class MIDletDemo extends MIDlet implements CommandListener
        private Alert _alert;
        private int _time;
        private Form _form;
        private myCanvas customCanvas;
        private Display _display;
        private UpdateThread _updateThread;
         * The thread that updates the explosion dialog box.
        private class UpdateThread extends Thread
            private boolean _disarmed;
            public void run()
                _disarmed = false;
                int i = _time;
                while (i > 0 && !_disarmed)
                    try
                        _alert.setString(Integer.toString(i));
                        synchronized(this)
                                this.wait(1000);
                        System.out.println("timeout in:" +i);
                    catch(InterruptedException e)
                        System.out.println("MyMidlet: Exception: " + e);
                    i--;
                if(!_disarmed)
                    _alert.setString("BOOM");
            void disarm()
                _disarmed = true;
         * Thread that pops up the program's main dialog box.
        private class GoCommand extends Command implements Runnable
            private GoCommand(String label, int type, int priority)
                super(label, type, priority);
            public void run()
                _alert.setString(Integer.toString(_time));
                _alert.setTimeout(_time * 1000 + 5000);
                _updateThread = new UpdateThread();
                _updateThread.start();
                _display.setCurrent(_alert, _form);
         * <p>The default constructor. Creates a simple screen and a command with an alert
         * dialog box which pops up when the command is selected.
        public MIDletDemo()
            _alert = new Alert("The Thermonuclear Device has been activated!\nTo disarm the device, dismiss this Alert.\nDevice will detonate in:");
            _alert.setCommandListener(this);
            _time = 10;
            // Create a simple screen.
            _form = new Form("Thermo-Nuclear Event");
          _form.append("Choose 'Go' from the menu.");
         customCanvas = new myCanvas();
            _display = Display.getDisplay(this);
            // Add our command.
            //_form.addCommand(new GoCommand("Go", Command.SCREEN, 1));
    customCanvas.addCommand(new GoCommand("Go", Command.SCREEN, 1));
    customCanvas.setCommandListener(this);
            //_form.setCommandListener(this);
            _display.setCurrent(customCanvas);
        //_display.setCurrent(_form);
        public void commandAction(Command c, Displayable s)
            if ( c instanceof Runnable )
                ((Runnable)c).run();
            if( c == Alert.DISMISS_COMMAND )
                _updateThread.disarm();
            _display.setCurrent(playerGUI);
         * <p>Signals the MIDlet that it has entered the Active state.
        public void startApp()
            // Not implemented.
         * <p>Signals the MIDlet to stop and enter the Pause state.
        public void pauseApp()
            // Not implemented.
         * <p>Signals the MIDlet to terminate and enter the Destroyed state.
         * @param unconditional When set to true, the MIDlet must cleanup and release all
         * resources. Otherwise, the MIDlet may throw a MIDletStateChangeException to
         * indicate it does not want to be destroyed at this time.
        public void destroyApp(boolean unconditional)
            // Not implemented.
    }now keep in mind, I took this from a nice little example MIDlet called DemoMidlet inside the BlackBerry JDE
    so it's not like they didn't make an effort. I mean I pretty much took it out of their examples located in
    C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\samples\com\rim\samples\device\midletdemo
    but lets face it...some of us like to use the Canvas Class...so showing us how to use it with a Form not exactly helpful.
    All I did was the same thing it's just I made a canvas, and implemented the CommandListener, then swapped their form for my canvas.
    It freaking worked like a charm. I mean I didn't really use that alert stuff...as it wasn't necessary, but it's a nice demo to learn from.
    Part 2: The Escape Key!
    The first and only problem I noticed when porting over to the blackberry was the lack of certain keys
    that I truly enjoy and need. I guess blackberry decided to just not implement them
    into the MIDlet canvas class?
    I mean they did a great job at figuring out how to map the entire qwerty keyboard, but when it comes to the Escape Key
    good luck!
    So after tearing my hair out I found a solution...which i'm guessing everyone else also found but i'm posting this
    cuz well..what if you're tearing your hair out right now...calm down take a deep breaths this is currently working on the BB 9000
    jde emulator.
    First of all I know this sucks but if you want to use that lovely escape key you're going to have to implement the BB KeyListener.
    I know WTF MAN!? "first i code the whole thing using keylistener/commandlistener now I gotta use some stupid BB KEYLISTENER!?...just who does blackberry think they are?"
    well heres the thing, I tore my hair out for like 12 hours straight trying to get around this...but after giving it a rest it's not such a big deal.
    Steps
    1) you have to grab the blackberry net_rim_api, and add it to your wireless toolkit.
    the path is:
    C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\lib\net_rim_api.jar
    what I did was copied the file and pasted it into
    C:\WTK2.5.1\lib\ext
    once you have that inside your ext folder in your project settings you can enable the external package, this way you can build
    using the RIM API.
    in case you wanta take a glance at that headache it's : http://www.blackberry.com/developers/docs/4.5.0api/index.html
    to enable it simply open up wtk, go to project/settings/External API's and check it off...take note that the wtk 2.5 generally comes with
    Nokia SNAP Mobile API so i'm guessing it's a normal thing to do with MIDlets. Also if you check off Bundle..that's not too good it includes the API
    with your package...which is really only helpful if you're trying to include some of that junk which really isn't necessary as the reason we're doing this in the first
    place is cuz blackberry wanted to be cool and have their own proprietary keys....
    Anyways check that off and continue to step 2.
    Implementing Key Listener with the Canvas Class! :-)
    2) This part is so easy...
    import java.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import net.rim.device.api.system.*;
    public class myCanvas extends Canvas implements CommandListener,KeyListener{
    String thekey = "no key pressed yet";
      public myCanvas() {
    Application.getApplication().addKeyListener(this);
    public void paint(Graphics g){
    g.setColor(255,255,255);
    g.fillRect(0,0,500,500);
    g.setColor(0,0,0);
    g.drawString(thekey,0,0,Graphics.TOP|Graphics.LEFT);
    public boolean keyDown(int keycode, int time)
                    thekey = String.valueOf(keycode);
                    repaint();
                return false;
            public boolean keyRepeat(int keycode, int time)
                 return false;
            public boolean keyStatus(int keycode, int time)
                  return false;
            public boolean keyUp(int keycode, int time)
                   return false;
      public boolean keyChar(char key, int status, int time) {
          if (key == Characters.ESCAPE)
             return false;
    public void commandAction(Command c, Displayable s)
      ///YOU DON'T NEED THIS! I just left it here, in case you wanted to also use the blackberry menu to do stuff...in this case
    //well the command is shown...and it calls the run method of the class you add the command to. My previous example
    // used the command GO, and i made a private class...so this would cause the run method to execute when the user hits enter on go.     
         // if ( c instanceof Runnable )
              //  ((Runnable)c).run();
    }i'm gonne be honest with you, the function public boolean keyChar()
    I don't know if that actually works...I just don't want to recompile without it cuz I just got over this headache..so I left it there.
    According to most people you use that to check if the key == Characters.ESCAPE and if it does then you do some stuff.
    Also you don't need the command listener, I just left it in there because well..if you're like me and you use the blackberry menu, you're pretty much
    going to use the CommandListener on your canvas to check to see if the user hit enter on a menu item.
    The function that matters here, is the same function Midlet coders are used to.
    instead of keyPressed it's simply keyDown
    so basically you're importing the package
    import net.rim.device.api.system.*;
    which allows you to implement blackberry's keyListener which gives you access to all the keys vs. a limited amount of them.
    now blackberry went all out as you can see. You have to have keyDown, keyUp, keyRepeated...it's kinda rediculous.
    but no worries, as long as you make sure that Display.setCurrent(yourcanvas);
    or you use one of those to give the canvas control...you'll be fine.
    It works because in the method for creating myCanvas()
    or whatever canvas you'll be using, it calls Application.getApplication.addKeyListener(this);
    and that little command gives your canvas the ability to listen for blackberry keys such as escape.
    the current code will start displaying the keycodes for each key...and apparently keys such as ESCAPE
    can be labeled properly. I love this because I can map the hang up call key to destroy my midlet, or even the escape key.
    Unfortunately every keycode displayed is in like unicode or some stupid format, so that's my guess as to why the Escape key is not detected by the normal
    canvas keyPressed method.
    Anyways you're done this should work...now if you're having trouble using canvas and you're like "but I don't use canvas" idk man...
    I use canvas...cuz I think programs should look cool. I'm sure this works without the canvas...on a form or something.
    But don't be fooled, you're not limited to KeyListener, you can also use TrackWheelEvent and all kinds of stuff. So just like the choices for CommandListener vs. keyPressed
    Blackberry has other choices as well.
    And they said merging the API's was a bad idea...shucks, how else are we supposed to use the freaking escape key.
    --JavaLover53
    P.S. I marked this as a question cuz I want people to really take a look at this. Make some comments, I love this forum
    and I really feel that this topic is not covered on the internet. A lot of naysayers, and when I found the solution I was like "that's it"
    "that's all I had to do?" "well then wheres the freaking tutorial!
    seriously people had me thinking I had to extend the blackberry UI when this is all I had to do..such an easy task
    that other people claim is ridiculously hard.
    Go ahead make your comments, lemme know if you know something I don't, i'm here to learn! :-)

    good writeup, however i found this only working when you're not running fullscreen

  • Problem with running the midlet class (Error with Installation suite )

    hi everyone...
    i have problem with running the midlet class(BluetoothChatMIDlet.java)
    it keep showing me the same kind of error in the output pane of netbeans...
    which is:
    Installing suite from: http://127.0.0.1:49296/Chat.jad
    [WARN] [rms     ] javacall_file_open: wopen failed for: C:\Users\user\javame-sdk\3.0\work\0\appdb\delete_notify.dat
    i also did some research on this but due to lack of forum that discussing about this,im end up no where..
    from my research i also find out that some of the developer make a changes in class properties..
    where they check the SIGN DISTRIBUTION...and also change the ALIAS to UNTRUSTED..after that,click the EXPORT KEY INTO JAVA ME SDK,PLATFORM,EMULATOR...
    i did that but also didnt work out..
    could any1 teach me how to fix it...
    thanx in advance... :)

    actually, i do my FYP on bluetooth chatting...
    and there will be more than two emulators running at the same time..
    one of my frens said that if u want to run more than one emulator u just simply click on run button..
    and it will appear on the screen..

  • Display from non-MIDlet class?

    Display from non-MIDlet class?
    I havel a method in my main MIDlet that flashes up a message as an Alert:
    public void doAlert(String sAlertText) {
           Alert alSending;
           alSending = new Alert(null, sAlertText, null, AlertType.INFO);
           alSending.setTimeout(3000);
            m_display.setCurrent(alSending);
        }m_display is declared and instantiated in the main MIDlet:
    public class Boss extends MIDlet implements CommandListener {
            public static Display m_display;
            public Boss() {       /** Constructor*/
                    m_display = Display.getDisplay( this );
    }Now when I try to call this from another class:
         new Boss().doAlert("Eat lead, Bambi!");I get: "SecurityException: Application not authorized to access the restricted API". The same happens if I try to use a reference to a MIDlet, rather than to a Display. Apparently, you can't instantiate a MIDlet from with another MIDlet / class.
    So, how do you obtain a reference to the currently-running MIDlet or its Display from a different class?

    Thanks for your reply, but i finally solved it. I found a way of getting a reference to my MIDlet, so i had the control of its display.
    Maybe it could be a good idea having some classes to write to the cellular's screen without being a MIDlet, like System.out.* classes in traditional Java.
    See you.
    David.

  • Using Timer and TimerTask classes in EJB's(J2EE)

    Does J2EE allow us to use Timer and TimerTask classes from java.util package in SessionBean EJB's ( Statless or Statefull )?.
    If J2EE does allow, I am not sure how things work in practical, Lets take simple example where a stateless SessionBean creates a Timer class
    and schedules a task to be executed after 5 hours and returns. Assuming
    GC kicks in many times in 5 hours, I wonder if the Timer object created by survives the GC run's so that it can execute the scheduled tasks.
    My gut feeling says that the Timer Object will not survive.. Just
    want to confirm that.
    I will be interested to know If there are any techiniques that can make
    the usage of Timer and TimeTask classes in EJB's possible as well as reliable with minmum impact on over all performance.

    Have a look at J2EE 1.4. I think they add a timer service for EJBs there...
    Kai

  • Whats the difference between an INTERFACE and a CLASS?

    Whats the difference between an INTERFACE and a CLASS?
    Please help.
    Thanx.

    http://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=%2Bforum%3A31&qt=Difference+between+interface+and+class

  • Page Attributes and Application Class Attributes

    Hi, everyone,
    I am quite new to BSP.
    I have a question here:
    what is the difference between page attributes and application class attributes of a bsp application? As they are both global attributes, there seems to be no big difference when we use them.
    thanks a lot.
    Fan

    Hi Fan,
    a BSP application can be made up of many pages.
    A page attribute is visible only in the page it is associated with.
    Attributes of the application class are visible from every page in that application.
    Cheers
    Graham Robbo

  • What is the difference between document class and normal class

    Hi,
    Please let me know what is the difference between document class and normal class.
    And I have no idea which class should call as document class or call as an object.
    Thanks
    -Actionscript Developer

    the document class is invoked immediately when your swf opens.  the document class must subclass the sprite or movieclip class.
    all other classes are invoked explicitly with code and need not subclass any other class.

  • How to get the jar file without knowing its name and any class inside it?

    Hello, everybody!
    I would like to know if there's a way to get a reference programatically to the initial jar without knowing its name and any class contained in it. By "initial jar" I mean the jar that was called in the prompt, like this:
    java -jar jarfile.jaror in another way, in a graphical system. To be sincere what I really want is to get a reference to the jar's manifest, but I know if I can get a reference to the jar I can get a reference to its manifest file. Or if you know a way to get the manifest directly, it would also help. So, is there a way to do this?
    Thank you.
    Marcos

    jverd wrote:
    marcos_aps wrote:
    abillconsl wrote:
    Can you be more specific - IOW, can you cite a specific case?Absolutely. I want to access the jar in source code with the java.util.zip.JarFile class, for example.But why? You still haven't provided a use case or explained what you're trying to accomplish. As already pointed out, whatever you're trying to do, this is a brittle solution. If you explain what you're trying to accomplish with this, somebody may be able to suggest a better approach.jverd, I explained for baftos. Anyway, I will try to be more specific. I start my sytem like this, from, say, for example, jar1.jar:
    import br.product.System;
    public static void main(String[] args)
        System.start("NameOfTheSystem");
    }The System class is in util.jar, for example. This jar is used by all systems. I wouldn't like to pass in the name of the system, as above. I would like that the System class could read it from jar1.jar's manifest file. I just would like to have this:
    import br.product.System;
    public static void main(String[] args)
        System.start();
    }It is more elegant and I don't have the name of the system in two places: code and manifest file.
    Marcos

  • Problem in generic value copier class / reflection and generic classes

    Hello experts,
    I try to archive the following and am struggling for quite some time now. Can someone please give an assessment if this is possible:
    I am trying to write a generic data copy method. It searches for all (parameterless) getter methods in the source object that have a corresponding setter method (with same name but prefixed by "set" instead of "get" and with exactly one parameter) in the destination object.
    For each pair I found I do the following: If the param of the setter type (T2) is assignable from the return type of the getter (T1), I just assign the value. If the types are not compatible, I want to instantiate a new instance of T2, assign it via the setter, and invoke copyData recursively on the object I get from the getter (as source) and the newly created instance (as destination). The assumption is here, that the occurring source and destination objects are incompatible but have matching getter and setter names and at the leaves of the object tree, the types of the getters and setters are compatible so that the recursion ends.
    The core of the problem I am struggling with is the step where I instantiate the new destination object. If T2 is a non-generic type, this is straightforward. However, imagine T1 and T2 are parametrized collections: T1 is List<T3> and T2 is List<T4>. Then I need special handling of the collection. I can easily iterate over the elements of the source List and get the types of the elements, but I can not instantiate only a generic version of the destinatino List. Further I cannot create elements of T4 and add it to the list of T2 and go into recursion, since the information that the inner type of the destination list is T4 is not available at run-time.
    public class Source {
       T1 getA();
       setA(T1 x);
    public class Dest {
       T2 getA();
       setA(T2 x);
    public class BeanDataCopier {
       public static void copyData(Object source, Object destination) {
          for (Method getterMethod : sourceGetterMethods) {
             ... // find matching getter and setter names
             Class sourceParamT = [class of return value of the getter];
             Class destParamT = [class of single param of the setter];
             // special handling for collections -  I could use some help here
             // if types are not compatible
             Object destParam = destination.getClass().newInstance();
             Object sourceParam = source.[invoke getter method];
             copyData(sourceParam, destParam);
    // usage of the method
    Souce s = new Source(); // this is an example, I do not know the type of s at copying time
    Dest d = new Dest(); // the same is true for d
    // initialize s in a complicated way (actually JAX-B does this)
    // copy values of s to d
    BeanDataCopier.copyData(s, d);
    // now d should have copied values from s Can you provide me with any alternative approaches to implement this "duck typing" behaviour on copying properties?
    Best regards,
    Patrik
    PS: You might have guessed my overall use case: I am sending an object tree over a web service. On the server side, the web service operation has a deeply nested object structure as the return type. On the client side, these resulting object tree has instances not of the original classes, but of client classes generated by axis. The original and generated classes are of different types but have the identically named getter and setter methods (which again have incompatible parameter types that however have consistent names). On the client side, I want to simply create an object of the original class and have the values of the client object (including the whole object tree) copied into it.
    Edited by: Patrik_Spiess on Sep 3, 2008 5:09 AM

    As I understand your use case this is already supported by Axis with beanMapping [http://ws.apache.org/axis/java/user-guide.html#EncodingYourBeansTheBeanSerializer]
    - Roy

  • Problems using different tables for base class and derived class

    I have a class named SuperProject and another class Project derived from
    it. If I let SchemaTool generate the tables without specifying a "table"
    extension, I get a single TABLE with all the columns from both classes and
    everything works fine. But if I specify a "table" for the derived class,
    SchemaTool generates the derived class with just one column (corresponds
    to the attribute in derived class). Also it causes problems in using the
    Project class in collection attributes.
    JDO file:
    <jdo>
    <package name="jdo">
    <class name="Project" identity-type="application"
    persistence-capable-superclass="SuperProject">
    <extension vendor-name="kodo" key="table" value="PROJECT"/>
    </class>
    <class name="SuperProject" identity-type="application"
    objectid-class="ProjectId">
    <field name="id" primary-key="true"/>
    </class>
    </package>
    </jdo>
    java classes:
    public class Project extends SuperProject
    String projectSpecific
    public class SuperProject
    BigDecimal id;
    String name;
    tables generated by SchemaTool:
    TABLE SUPERPROJECTSX (IDX, JDOCLASSX, JDOLOCKX, NAMEX);
    TABLE PROJECT(PROJECTSPECIFICX)
    Thanks,
    Justine Thomas

    Justine,
    This will be resolved in 2.3.4, to be released later this evening.
    -Patrick
    In article <aofo2q$mih$[email protected]>, Justine Thomas wrote:
    I have a class named SuperProject and another class Project derived from
    it. If I let SchemaTool generate the tables without specifying a "table"
    extension, I get a single TABLE with all the columns from both classes and
    everything works fine. But if I specify a "table" for the derived class,
    SchemaTool generates the derived class with just one column (corresponds
    to the attribute in derived class). Also it causes problems in using the
    Project class in collection attributes.
    JDO file:
    <jdo>
    <package name="jdo">
    <class name="Project" identity-type="application"
    persistence-capable-superclass="SuperProject">
    <extension vendor-name="kodo" key="table" value="PROJECT"/>
    </class>
    <class name="SuperProject" identity-type="application"
    objectid-class="ProjectId">
    <field name="id" primary-key="true"/>
    </class>
    </package>
    </jdo>
    java classes:
    public class Project extends SuperProject
    String projectSpecific
    public class SuperProject
    BigDecimal id;
    String name;
    tables generated by SchemaTool:
    TABLE SUPERPROJECTSX (IDX, JDOCLASSX, JDOLOCKX, NAMEX);
    TABLE PROJECT(PROJECTSPECIFICX)
    Thanks,
    Justine Thomas
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Data class and Delivery class in ABAP Dictionary

    Hi all,
    I want to know the exact information about Data class and Delivery class in ABAP Dictionary
    Moderator message : Search for available information. Thread locked.
    Edited by: Vinod Kumar on Aug 3, 2011 1:35 PM

    As your name Suggests, there were exactly 21 rajapandian already who wanted exact information about  Data class and Delivery class. Fortunately some has found the information by own and some were dumped by SAP Police.
    Cheers
    Amit

  • BOR Object and ABAP Class

    Hi,
        Can anybody say when to use BOR object and Abap class in the task with an example.
    Thanks,
    Mugundhan

    There is no any specific condition or rule that for this purpose you need to use BOR and Class , it depends on your requirement. not only the requirement but also the new techniques to make classes not just as simple way to create objects but when you use classes in the Workflows they are not simple classes but they are BUSINESS CLASSES which makes a lot of difference.
    Check the blogs of [Jocelyn Dart|https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action%3fpageid=55566]

  • Difference between narrow() method usage and simple class cast for EJB

    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?
    P.S. I'm working with WL 6.1 sp2
    Any help would be appreciated.
    Thanks in advance,
    Orly

    [email protected] (Orly) writes:
    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?(1) is mandated by the spec. It is required because CORBA systems may
    not have sufficient type information available to do a simple case.
    P.S. I'm working with WL 6.1 sp2 You should always use PRO.narrow()
    andy

Maybe you are looking for

  • F4IF_INT_TABLE_VALUE_REQUEST doesn't work

    I want to popup a F4 window for bank name accroding to vendor no. *declare internal table for bank data: begin of bk occurs 0,           no like lfbk-bankn,           curr like lfbk-bkref,           name like bnka-banka,           acct like lfbk-koin

  • 10.7.5 update progress bar "upgrading iCal calendars"

    I completed the 10.7.5 update on my MacBook Pro (2011) about ten minutes ago. Since then, after opening iCal, the progress bar "upgrading iCal calendars" has been sitting here. I do have a lot of historical calendar data, going back to 2003. Has anyo

  • Remote file template not updating on website

    Hello I am very very new to dreamweaver and have been handed a website that I have to maintain and make changes to. The website uses a template called index with further nested templates as shown The index template contains the code for the Menu Bar

  • Firefox Browser window will not open or start.

    Sorry that this is long, but I wanted to make sure you knew as much as you needed to know. I click on the icon in my Windows taskbar, and the firefox browser window will not open. This was not the first of my problems. At first, Firefox would open im

  • Are the mirroring airplay work on macbook pro core 2 duo 2010 version

    are the mirroring airplay work on macbook pro core 2 duo 2010 version