Increased Duke Dollars for an old thread without reply

Hi All,
Wonder anyone experienced a similar problem and solved it.
I have a stand-alone application that talks to EJBs. It has been running well either from another machine or the same machine with WebSphere server for WebSphere 3.5. After we upgrade to WebSphere 4.0. I can still run it from another machine with properties: (tmx-huri is the machine hosting WebSphere)
providerURL=iiop://tmx-huri:900/
ctxFactory=com.ibm.websphere.naming.WsnInitialContextFactory
and add the following jar files into the classpath from WebSphere 4.0: ejs.jar (this is from 3.5 because 4.0 does not have it), websphere.jar, ns.jar, util.jar, ras.jar, ujc.jar.
But if I copy all the same files to tmx-huri itself and just change providerURL to:
providerURL=iiop://localhost:900/
It will show message saying 'Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory'
If I use
ctxFactory=com.ibm.ejs.ns.jndi.CNInitialContextFactory
instead, it always throughs NamingException saying cannot find the bean.
I appreciate any comment and suggestions.
PC
The basic code is shown here:
Properties namingProps = new Properties();
namingProps.put(javax.naming.Context.PROVIDER_URL, providerURL);
namingProps.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,initialContextFactory);
// Create an Initial Context.
try {
initContext = new InitialContext(namingProps);
catch (javax.naming.NamingException e) {
System.err.println ("EJBHomeFactory:constructor() Could not retrieve initial context - all EJB lookups will fail. Exception: "+e.getMessage());
where providerURL and initialContextFactory can be retrieved from a property file.
To lookup EJB:
Object home = initContext.lookup(beanName);

An interesting situation. I use to work with WAS 3.5 ages ago (2 years?) and remember coding stuff as you have done with the properties for the initial context factory. I then went and played with Oracle 9iAS for a while and am back with WebSphere for the last 6 months or so in WAS 4. I had forgotten how I use to do things in 3.5 and the way we are doing stuff here in version 4, is simply
Context entityContext = new InitialContext(System.getProperties());
Object obj = entityContext.lookup("java:comp/env/ejb/myBean"); Then we do the narrow.... blah blah blah.
The point being that we are not worrying about copying any jars from anywhere. We are unit testing inside Websphere Studio Application Developer, and then deploying into WAS V4 and it all just goes.
Maybe give that a try and let the websphere environment provide you its defaults.
Cheers,
Peter.

Similar Messages

  • Duke Dollars for DrClap

    It is mostly thanks to reading DrClap's responses in the archives that I got my serial port problem resolved so here are 10 Duke Dollars for him.
    Just leave a message and I'll award them to you. Thanks for your past responses.
    see: http://forum.java.sun.com/thread.jsp?forum=4&thread=174689

    You're welcome.

  • Duke Dollars for the first to implement the JOSRTS Tech Test

    See http://www.josrts.org/cgi-bin/ikonboard/ikonboard.cgi?act=ST;f=6;t=124
    If the offered Duke Dollars aren't showing up, it's because I haven't figured out yet how to attach them to the post. Give me some time, it's the first time I've offered them. :-)

    The following errors were found:
    The board administrator requires that all members log
    in before viewing the boardSorry, that's just the way the board is set up. Feel free to create a login and lurk around.
    For those of you unfamiliar with JOSRTS (http://www.josrts.org), it is an attempt by the community to create a Real Time Strategy game in Java. This challenge is meant for members of the project, but if anyone would like to join the project, feel free.

  • Is it possible to get a system disk for my old iMac without the receipt?

    I use an iMac at work and it's really slowing down. (10 minutes at least to open any application) I have 3 GB of ram and use only a quarter of my hard drive space. I've looked everywhere for the startup disk to no avail. I've used TechTool Deluxe and it says that the directory needs repair. When I used DiskUtitlity last, it says that the hard drive needs repair and to restart with the system disk and use Disk Repair. If anyone has any thoughts on this matter, I'm all ears.

    No receipt is needed assuming they are still available for your vintage machine. All you need is a credit card and the machine's serial number. Then call AppleCare and if they are available they will ship a replacement set for a nominal cost.

  • Next/previous links?  Duke dollars...

    I am offering Duke Dollars for help in creating next/previous links here:
    http://forum.java.sun.com/thread.jsp?forum=45&thread=183010
    I was told that I should ask here as there may be more help here...

    Actually I think that respondant was suggesting that you search the JDBC forum - they had already posted some information in here.

  • I'm trying to make i(to the power of n) over n.quickanswer=MANY duke dollar

    I will pay many duke dollars for a quick answer to this.
    i(to the power of)n
    the full equation is r=---
    n
    heres what i did:
    class Project
         public static void main(String[] arguments) {
              int P = 0;
              int r = 0;
              int n = 0;
              int t = 0;
              int i = 0     
              int interest = i public static double exp(n) / n;
              system.out.print("The Interest rate is" + interest);
              int rate = 1 + r public static double exp(1/n) h;//the effective rate
              system.out.println("The effective rate is" + rate);
         int A = P (1 + i public static double exp(n) /n) public static double exp(n*t);
    The program isn't finished i have to get this far without errors

    one last thing. could you just go over this briefly and quickly?
    class Project { 
         public static void main(String[] arguments) {
              int P = 0;
              int r = 0;
              int n = 0;
              int t = 0;
              int i = 0;     
              //these values are put in by you, the user.
              int interest = Math.pow(i, n) / n;
    system.out.print("The Interest rate is" + interest);
              int rate = Math.pow((1 + r), 1/n) ;//the effective rate
    system.out.println("The effective rate is" + rate);
              int A = P * Math.pow( (1 + Math.pow(i, n) / n), n * t); system.out.print("The total holdings (A) is" + A);
              int e = Math.pow(1 + (1 / n), n);     system.out.print("The return (e) is" + e);
              int time = P Math.pow(1 + r, t);
    system.out.print("The time needed to double?");
    system.out.print("The time needed for this principal is" + time);

  • Who has the most duke dollars?

    Is there a place in the JDC where you find find a list of who had the most duke dollars? I think they had this a long time ago, but I'm not sure what happend to it.
    Thanks,
    Strider

    http://developer.java.sun.com/developer/community/dd.jshtml#winners
    (Do I get any duke dollars for this?)

  • How can I increase the volume of my text alerts without increasing call volume??

    The alerts that are pre-programed on my phone for text alerts are very quiet.  When I turn the volume up so that I can hear them then my call volume is embarrassingly loud.  I have tried to get new tones in the store but they all seem to download to my ringtone - not text tones.  I have even purchased (from the Verizon store) tones that are for texts, but again, they download into my call ringtones.  Any suggestions would be great since I am a big texter and am getting very frustrated because of missing so many.

        @Halon,
    I know how you feel! Text messaging is my main means of communication so I use it all the time. I definitely don't want you missing any important text messages because you can't hear the alert.
    Keep in mind that the volume level will increase or decrease the same for both calls and text alerts. You may notice that the ring tones options for the text messages are not as loud as the ones for calls. Unfortunately, there is no way to increase the volume for the text alerts without increasing the volume for the call alerts as well.
    One thing you can try is turning in the Vibrate mode so the phone vibrates also when you receive a text messages. Visit http://vz.to/1aflRJ0 for steps.
    Keep me posted if you need further assistance.
    JohnB_VZW
    Follow us on Twitter @VZWSupport

  • InetAddress Timeout (Duke Dollars Available)

    Hi people, am making a program that needs to change IP Addresses to domain names, in most cases this code works fine
    InetAddress temp = InetAddress.getByName(ipAddress);
                    try {
                        domainName= temp.getHostName();
                    catch(UnknownHostException ex)
                    { System.out.println("Could not find "+domainName);
                }However, many of the ip addresses will not find a domain name. it will take 5 seconds to discover this where as it will take no time at all to discover a correct domain name if one can be found. is there any way that i can timeout this action if it takes over 20 milliseconds to find a name.
    Thank you for your help.
    code to correct this will lead to ten duke dollars.

    for a java help forum, why does nobody want to be at
    all helpful, i am really stuck and would be really
    greatful of some helpUm, hardly any time has passed yet. Don't start copping an attitude just yet...
    But as alluded to, the duke dollars are utterly worthless. If I wanted 10 more dukes to add to my pile, I could (but wouldn't) just create another login ID, post a fake "question", answer myself with this ID, and award them to "myself".
    Do you actually have a question, other than "will someone do my work/thinking for me"?

  • HT1349 i want to cancel icloud $25.00 charge per month for itunes. my 12 year old applied without my permission

    I want to cancel my 25 dollar amount per month fee. my 12 year old applied without my permission

    Are you sure its for itunes? Not aware of any service thats $25/month. Itunes match is that price for a year.
    Anyway, you should contact itunes store support
    iTunes store support
    http://www.apple.com/support/itunes/

  • I may have totally screwed myself but...after installing Yosemite without checking first, my CS4 Design Premium suite wouldn't open. So I deinstalled it, but I only have disks for my old CS3. When I got the CS4 upgrade I downloaded it. What can I do??

    I may have totally screwed myself but...after installing Yosemite without checking for potential problems with Adobe software, my CS4 Design Premium suite wouldn't open. So after consulting some forums, I deinstalled it, but I only have disks for my old CS3. When I got the CS4 upgrade I downloaded it, back in 2011... What can I do?? Everything was fine before I upgraded that *#$%* Yosemite.

    You can find the CS4 download here: https://helpx.adobe.com/creative-suite/kb/cs4-product-downloads.html
    Benjamin

  • My IPhone is asking me to type in my password for my old Apple ID that does not exist anymore. I cant set up ICloud without typing in a password to a Apple ID that does not exist, so do I have to remove everything from my IPhone and start over?

    my IPhone is asking me to type in my password for my old Apple ID that does not exist anymore. I cant set up ICloud without typing in a password to a Apple ID that does not exist, so do I have to remove everything from my IPhone and start over?

    Hello miamat2017
    You should see an option to skip that step and then sign out of it when looking in Settings. Check out the article below for more information.
    iOS 7: If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/kb/ts5223
    Regards,
    -Norm G.

  • I change my password in my ipod about an hour but now i want to change it again and they won't recognize my old passwords. How do change my password without them asking for my old passwords? Also can i change it in iTunes?

    I changed my password in my iPod about an hour but now i want to change it again and it won't recognize my old password. How do I change my password without them asking for my old password? Also can i change my password from my iPod through iTunes?

    On the iPod did you go to Settings>Store and sign out and then sign in with the new password?

  • Test topic for duke dollars test case

    Have had issues reported regarding not being able to assign duke dollars. This is a test to see if there's an issue or not. -- DanG

    it should look like:
    Forum Home > New To Java Technology
    Topic: test to assign Duke dollars
           Duke Dollars
           If you'd like, assign Duke Dollars to this topic to encourange
           others to answer your question. [More Info]  at the top of this thread.

  • My iCloud account is showing my old username and I cannot remember my old password for this old account.  I cannot fid anyway of resetting this without remembering my old password. Please help

    My iCloud account is still asking me for my password for an old Apple ID. I have changed my Apple ID and created a. New password, but whenever I come to iCloud, it is asking me to sign in with my password for my old Apple ID.  I cannot remember this password, which is why I reset it, but I can't seem to get into iCloud or delete my I could account without this old password please help anyone, am getting very frustrated with it all.

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

Maybe you are looking for

  • How to create a report in this style

    Hello, I faced a problem about report display in dashboard. there are a year prompt, If I choose 2010, the report will show three years' sales , namely 2009,2010,2011, three years' data. like: YEAR 2009 2010 2011 SALES 100 200 300 and if I choose 200

  • Orientation of iPhotos photos in Web Gallery

    Does anyone know why it is that when I upload pictures from my camera to iPhoto, create an event and album, rotate the pictures that are not upright, and then publish the event/album to Web Gallery that the pictures that I rotated in iPhoto are no lo

  • How to include an APD process in BW Process Chain

    HI, I have an existing process chain that I want to add an APD process to. There are dependencies. For example, I want the last 2 steps in the existing process chain to continue AFTER the APD process runs successfully. So, how would I include an APD

  • Elements 7 upgrade to Elements 11

    I need to upgrade from Elements 7 to Elements 11 but I need to install the upgrade on a different computer than the Elements 7 is on. How can I do this?

  • After installing Mountain lion, macbook air 2011 very slow

    After installation of Mountain lion my macbook air 2011 got very slow. There has been a firmware upgrade too. Can you help?