In sun's j2sdkee:abou JNDI,I don't know the two paramters' value

In sun's j2sdkee, I deploy my first EJB, and I run a client code to test it.
but I don't know the two paramters' value:
java.naming.provider.url
(Context.PROVIDER_URL)
and
java.naming.factory.initial
(Context.INITIAL_CONTEXT_FACTORY)
Do I need to install another a naming and directory server?????
when I start j2ee, is there a naming and directory server already running?
thanks a lot!

The PROVIDER_URL gives the JNDI api knowledge about where to begin a tree. The tutorial on it can be found here: http://java.sun.com/products/jndi/tutorial/beyond/url/config.html
For example, when using JNDI to explore a filesystem, the PROVIDER_URL tells JNDI which directory to start with:
env.put(Context.PROVIDER_URL, "file:/");For a JNDI call to a J2EE server, it tells the JNDI api which machine and port it needs to connect to in order to retrieve JNDI objects.
Using JNDI to access an LDAP server, you may need a PROVIDER_URL like this: ldap://somehost:389.
The INITIAL_CONTEXT_FACTORY specifies the java classes that will translate and map your JNDI requests to the physical media you're accessing. This could be classes that know how to traverse a filesystem, or an LDAP instance, or a J2EE server. In the Sun tutorial, they use the following class to examine the filesystem of a local computer:
env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.fscontext.FSContextFactory");So, to answer your question, NO, you do not need another naming and directory server. The J2EE server will have all the infrastructure in place to handle your request for the EJB. How are you requesting your EJB? If it's from a webapp within the J2EE server or another EJB, you may not need to specify any of the above mentioned information, and you may be able to get by with just InitialContext context = new InitialContext();.
If you're trying to reference the EJB from a standalone application, you'll need to specify both the PROVIDER_URL and INITIAL_CONTEXT_FACTORY. You may also need to provide the SECURITY_PRINCIPAL (username) and SECURITY_CREDENTIALS (password) as well.
Let me know exactly how you're trying to access your EJB and I may be able to help your further.
Thanks,
Perry Tew

Similar Messages

  • I don't know the password for the SMTP account so as to mail photos.  How can I retrieve or change the password?

    I am unable to share photos from the Iphoto program because I don't know the password for the SMTP account.  How can I either retrieve or change that password?  Or is it one I already should know?

    Have you set the general preferences in iPhoto to email using iPhoto? Then change it to email using "Mail". This way iPhoto will use your regular Mail account.

  • How do I install lion on a MacBook pro if I don't know the password?

    I know what you're thinking, "if you don't know the password, it's probably not yours." I'm actually a go-to guy for pawn shops when they get electronics. The guy pawned his laptop and didn't pay to retrieve it. It is now property of the pawn shop but they initially forgot to ask the guy for the password and now he won't reveal it to us.
    I want to wipe the computer and install the latest os on it. Can you please tell me the simplest way? It automatically logs in when starting up and I'm able to download lion but I think it's going to ask me for a password. I could be wrong though.

    Did you get the Mac OS X install disks from the pawnshop, perchance? If not, you'll need to call Apple tech support and order a set, or if the MBP is an older one that didn't come with Snow Leopard, a retail copy of the Snow Leopard installer. Then you can boot from that installer disk, erase the drive (highly recommended), install SL and upgrade to Leopard. Or you can buy the Lion installer on a USB flash drive, boot from that, and again erase the drive and install.
    Regards.

  • My icloud and Apple ID aren't the same email address. My phone wont let me change my icloud email. I don't know the password to my icloud account, and every time I try to email myself the password, it doesn't go through.

    My icloud and Apple ID aren't the same email address. My phone wont let me change my icloud email. I don't know the password to my icloud account, and every time I try to email myself the password, it doesn't go through.

    Welcome to the Apple Community.
    Your Apple ID and iCloud email address don't need to be the same, you can't change an iCloud email address.
    Also check your Mail rules and filtering, the verification mail may be going to a junk folder or even being deleted altogether. You may also wish to contact your mail provider to see if their spam filters are removing the email before it gets to you.

  • I've already changed email for my apple id more than 6 months. But 2-3 months ago until now I've recieved and email to ask apple id confirmation from me. I never confirm anything because I don't know,the link's attached, it's legal or illegal.

    Dear Apple support team,
    I've already changed email for my apple id more than 6 months. But 2-3 months ago until now I've recieved and email to ask my apple id confirmation from me about 6-8 emails. I never confirm anything because I don't know,the link's attached, it's legal or illegal.
    The latest link (just be sent to my email 1 hr. ago) : http://www.smartpixeladv.com/proma/Login/index.html 
    Text is:
    Dear Customer,
    We recently noticed an unusual activity in your iTunes account. Please complete the process to confirm your
    informations.
    Confirm Now>
    This link will expire three days after this email was sent.
    If you don’t make this request, your account will be blocked for security reasons.
    Apple Support​
    In my opinion, i think      "http://"   should be   "https://"  right?  Or Apple should show the link on your website  that we can find, re- check and click by ourselve. Or  Apple should do "How to confirm apple id" on your main page. ( in fact  i'm not sure you already done "How to" on your website yes or not, because I cannot find it)
    The apple id is sensitive security, it's concerned personal security and any credit card payment so please understand me that's why i must to interrupt your team to help me to solve this problem. I'm scared my account will be blocked. Please advice me.
    Wassa. (BKK)

    It is a phishing attempt to get your Apple ID and Password.
    You should forward it to Apple : [email protected]

  • How do I change my icloud email when don't know the old password after I have changed my apple ID email address and the password? icloud is still online with my old email address!!!

    I got a new phone but backed it up through my itunes, and when I tried to use icloud it kept telling me I have forgotten my password, when I really really didn't. So I went to settings > itunes&appstore and changed my password, but also changed the email address too while I was at it, since I've always wanted to change it. But now here's the problem. My iphone's icloud is currently logged in with my old apple ID email address, which seems to not work with the new password, so I can't log it or even delete the account off my iphone. And ovbiously, I don't know the old password that I have "forgotten", as my phone tells me. There seems to be no way of changing the icloud account now.... What should I do?!

    So what was the solution. I have a similar problem on all of my devices now

  • How do I disconnect my phone number from an Apple ID that I don't know the PW to?? Thanks!!

    Hi everyone! How do I disconnect my phone number from an Apple ID that I don't know the PW to?? I am trying to help my friend - she got divorced from her husband who has her phone number under his Apple ID. He claims he doesn't remember the PW and that Apple couydn't help him?! Any thoughts? Thanks!!

    1. He is lying.
    2. Require him to buy her a new iPhone in the settlement.

  • HT204053 I want to use the same apple Id but I don't know the password for my email account to verify iCloud any answers?

    I want to use the same apple ID but I don't know the password for my email account to verify iCloud any answers?

    iForgot.com

  • I don't know the password for my OLLLLDDDD iTunes AOL accounts, and thus can't play half of my music. How can I fix this?

    I recently had to get a new hard drive on my laptop and thus lost all of my music. I've had my iPod for somewhere around six years, and have amassed a lot of music during that time and gone through a couple computers (mostly because I was working up to a computer of my own...). So, if you can guess where I'm going with this, I have had at least three different iTunes accounts and I still have all of the music on an external drive. My problem is that now that I'm putting my music back on to the new hard drive, I can't play some of the songs because I don't know the password for the OLD AOL accounts. I've tried every variation of password I can think of that I would have used, but still come up with nothing. I tried calling the AOL support number and the guy said he had no idea what I was talking about and hung up on me. To make things even more confusing, iTunes seems to have created an identical account to the one I use now but as an AOL account and I have absolutely no idea what the password is. This means that half of my music/TV shows/movies are not able to be watched/listened to. Does anybody have any idea what I can do to recover my password? Or am I totally screwed?? Please help!

    Ok..
    Launch iTunes. From the menu bar top of your screen click Store / Authorize This Computer.
    iTunes seems to have created an identical account
    No... Apple does not "create" an account for you.
    I've had my iPod for somewhere around six years, and have amassed a lot of music during that time and gone through a couple computers
    You've purchased iTunes media all this time and never backed it up?

  • HT5312 how can i add a secure email address to my account if i don't know the answers to my security questions?

    how can i add a secure email address to my account if i don't know the answers to my security questions?

    I don't know either! I NEED HELP CAUSE I PUT MONEY INTO IT and they ask for my SECURITY QUESTION ANSWERS! When I try to change my security questions, which i forgot, they askk me for the ANSWERS TO MY SECURITY QUESTIONS!!!!!!!!!! I CAN"T DO IT IF I DON"T KNOW IT!

  • I just created an iCloud email and I want to use that email for my iTunes account as well. I need help suiting the old apple I'd because I do not remember anything associated with that email and I don't know the security questions

    I just created an iCloud email and I want to use that email for my iTunes account as well. I need help switching the old apple ID because I do not remember anything associated with that email and I don't know the security questions or the login for that old email.

    You cannot do that.  The AppleID you used to create the iCloud account is an active primary email address.  The email address you created with the iCloud account is also an active primary email address (all Apple domain email address automatically become AppleIDs as well).  You cannot replace the primary email address on one active AppleID with the primary email address on another, active AppleID.
    You can use your iCloud email/AppleID with iTunes, but it will be a separate account, so all your previous purchases remain tied to the other AppleID you have.
    I don't understand your statement that you could not remeber your old AppleID password, as you would have had to use it to create the iCloud account in the first place (the first step of creating the iCloud account required you to login with your existing AppleID and password)?

  • TS2446 So I have an iphone and for some reason I don't know the password for my Apple ID so I can't download apps and I don't have the password to my email to change it and I don't know the secret questions , what can I do to make a new Apple ID ?

    So I have an iphone and for some reason I don't know the password for my Apple ID so I can't download apps and I don't have the password to my email to change it and I don't know the secret questions , what can I do to make a new Apple ID ?

    I have the same problem - it is maddening. I rely on this iPad for work so this is not just an annoyance! The above solutions of changing the appleid on the device or on the website do not work.
    The old email address no longer exists - I haven't used it in a year probably and I no longer have the account.  I logged into the appleid website and there is no trace of the old email address so there is nothing that can be deleted or changed there.  On the iPad there is no trace of the old email address so nothing can be deleted there either. I have updated the iPad software and the same problem comes right back.  Every 2 seconds I am asked to log in using the old non-existent email.  The device is currently useless.
    The only recent change to anything was the addition of an Apple TV device, which was set up using the correct login and password.
    Does anyone have any ideas? The iPad has been backed up to the iCloud so presumably it now won't recognize the current iCloud account? So restoring may notbe an option?

  • HT204053 how do I change email address on icloud for my phone?  somehow I have another email address on my laptop and want them to be the same plus I don't know the old/phone password

    How do I change the email associated with Icloud on my phone.  It's not my mail apple id, its and old one and I don't know the password anymore.  I have another apple ID associated with my ipad and laptop and the icloud works great with that.  I just did the new iphone update and now its constantly asking for the icloud/apple id - the one I don't even know the password for anymore and it keeps popping up all the time. 

    If you mean that Find My Phone is asking for a password to a different Apple ID to your current Apple IDand that ID is a previous version of your current ID, not an entirely different one.
    This feature has been introduced to make stolen phones useless to those that have stolen them.
    However it can also arise when the user has changed their Apple ID details with Apple and not made the same changes to their iCloud account/Find My Phone on their device before upgrading to iOS 7, or if you restore from a previous back up made before you changed your details.
    The only solution is to change your Apple ID back to its previous state with Apple at My Apple ID using your current password, you don’t need access to this address if it’s previously been used with your Apple ID, once you have saved these details enter the password as requested on your device and then turn off "find my phone" and delete the account from your device.
    You should then change your Apple ID back to its current state, save it once again and then log back in using your current Apple ID. Finally, turn "find my phone" back on once again.
    This article provides more information about Activation Lock.

  • I use since 1 year iTunes match. Do I get a mail from apple to renew my subscription or do I have to renew my subscription for my own? I don't know the exactly date from the end of lifetime?

    I use since 1 year iTunes match. Do I get a mail from apple to renew my subscription or do I have to renew my subscription for my own? I don't know the exactly date from the end of lifetime?
    Kind best regards - sunshine34778

    The subscription will renew automatically (unless you have disabled that) and you will get an email approximately one month before renewal.

  • My iphone wont let me use it because i don't know the password or apple id to my itunes account i cant even restore it. What can I do?

    my iphone wont let me use it because i don't know the password or apple id to my itunes account i cant even restore it. What can I do?

    How can you not know your Apple ID?
    If you can't remember it, try recovering it here: https://iforgot.apple.com

Maybe you are looking for