Looking up local object after local home is retrieved.

I have a question regarding accessing an entity bean from a session bean locally. I currently access the remote interface, but would like to access the local interface to the bean. In the remote version, I use:
Iterator i = lHome.findByBasePrice(100000).iterator();
               ProductLocal prod = (ProductLocal) javax.rmi.PortableRemoteObject.narrow(i.next(), ProductLocal.class);
               String desc = prod.getDescription();
but what do I use instead of PortableRemoteObject when trying to obtain interface locally? Is there anything special I need in my deployment descriptors other than <ejb-local-ref> within the <session> entry?
Thanks,
-Dave

(1) You will not use PortableRemoteObject for looking up local interfaces.
(2) You will lookup the bean as below
Context ctx = new InitialContext();
beanLocalHome blh = (beanLocalHome) ctx.lookup("java:comp/env/beanJNDINAME");
beanLocal bl = blh.findByXXX(searchValue);
Regards,
Meka Toka

Similar Messages

  • Unable to lookup ejb local home interface after moving to wls 7.0

    I'm getting an exception trying to lookup an ejb's local home interface
    which I believe was deployed correctly. On startup I get the message:
    EJB Deployed EJB with JNDI name
    com.logistics.basedata.ejb.shipperspecificfveb.ShipperSpecificFVDOLocalHome.
    However, when I try to do a lookup using this jndi name, I get the
    following exception:
    javax.naming.LinkException: . Root exception is
    javax.naming.NameNotFoundException: Unable to resolve
    'app/ejb/ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb/local-home'
    Resolved: 'app/ejb'
    Unresolved:'ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb'
    ; remaining name
    'ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb/local-home'
    The name it can't resolve is different than the name I was trying to
    look up. I can see
    com.logistics.basedata.ejb.shipperspecificfveb.ShipperSpecificFVDOLocalHome
    in the jndi tree through the admin console, but the attributes Object
    Class, Object Hash Code, and Object To String are blank.
    This worked with weblogic 6.1 sp3. Is there something I missed in the
    migration to 7.0?
    Any help would be appreciated. Thanks in advance,
    -Brad

    That explains it - in 7.0 (unlike 6.1 - then the only factor was
    classloaders arrangement) client has to be
    in the same application (ear) - note JNDI links used to be able to lookup
    local homes.
    "Brad Geddes" <[email protected]> wrote in message
    news:[email protected]...
    I'm looking it up from a web application. I did notice a message on thistopic
    from last thursday (subject: "Pls Help! Failed to access local Sessionbean in
    7.0!"). In it, the individual said he had to add ejb-local-ref elementsin the
    web.xml. I tried this but can't seem to get it to work.
    javax.naming.NameNotFoundException: Unable to resolve ejb-link.
    ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb isnot in
    the context. The context includes the following link bindings: {} Makesure the
    link reference is relative to the URI of the referencing module.
    Also, I don't have a war or ear in the environment I'm working in; theejb's are
    all deployed separately in jar files, and the web app is in explodedformat.
    >
    -Brad
    "Dimitri I. Rakitine" wrote:
    Are you looking up the local home from outside of an application ?
    "Brad Geddes" <[email protected]> wrote in message
    news:[email protected]...
    I'm getting an exception trying to lookup an ejb's local home
    interface
    which I believe was deployed correctly. On startup I get the message:
    EJB Deployed EJB with JNDI name
    com.logistics.basedata.ejb.shipperspecificfveb.ShipperSpecificFVDOLocalHome.
    >>>
    However, when I try to do a lookup using this jndi name, I get the
    following exception:
    javax.naming.LinkException: . Root exception is
    javax.naming.NameNotFoundException: Unable to resolve
    'app/ejb/ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificf
    veb/local-home'
    Resolved: 'app/ejb'
    Unresolved:'ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecif
    icfveb'
    ; remaining name
    'ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb/loca
    l-home'
    The name it can't resolve is different than the name I was trying to
    look up. I can see
    com.logistics.basedata.ejb.shipperspecificfveb.ShipperSpecificFVDOLocalHome
    in the jndi tree through the admin console, but the attributes Object
    Class, Object Hash Code, and Object To String are blank.
    This worked with weblogic 6.1 sp3. Is there something I missed in the
    migration to 7.0?
    Any help would be appreciated. Thanks in advance,
    -Brad
    Dimitri--
    Dimitri

  • Script to remove local home directory after sync

    Does anyone have a good script to clear (periodically) the local home folders created by mobile accounts for sync ?
    There is one mentioned in John DeTroye's overview of Tiger server v12.1, by Steve Hayman, but I'm having trouble running it via ARD.
    Thanks

    I'm doing this for 2 reasons:
    - as a scripting exercise
    - because the local repo is a shared wordpress mess and people forget to make commits so I'd like a local backup that includes all changes that may not be in github (sadly).
    Anyhow, thanks for the input about trap, I'm definitely confused by it's use at this point but have reworked the script without it.
    #!/bin/sh
    set -e #Exit on any error.
    TIME=`date +"%m.%d.%Y@%H:%M:%S"` # Define the TIME variable as today's date and time.
    MONTH=`date +"%b"` # Define MONTH as today's month.
    FILENAME="backup-$TIME.tar.gz" # Define the filename structure.
    SRCDIR="/stuff" # Define folder to backup.
    DESDIR="/Backup/$MONTH/" # Define the backup folder location.
    LOGFILE="$DESDIR/backup-$TIME.log" # Store the output in a log.
    REMOTE=$(git ls-remote -h origin master | awk '{print $1}') # Get commit hash from head of remote master repo (github)
    LOCAL=$(git rev-parse HEAD) # Get commit hash from head of server repo (dev/test)
    if [[ $LOCAL == $REMOTE ]]; then # If the hashes match
    echo "No update required." >> $LOGFILE # Then no pull is needed
    else # If the hashes don't match then prepare to run our backup
    mkdir -p $DESDIR # Create our directory if it doesn't exist.
    echo "Backup started for "$TIME >> $LOGFILE # Make it log what it's doing.
    tar -cpzf $DESDIR/$FILENAME $SRCDIR >> $LOGFILE 2>&1 # Perform the backup.
    echo "Backup Finished for "$TIME >> $LOGFILE # Log that it's finished.
    echo "Preparing for git pull " >> $LOGFILE #Log what we're doing.
    cd /stuff >> $LOGFILE 2>&1 # Make sure we're in our repo directory
    git pull >> $LOGFILE 2>&1
    echo "Git pull completed successfully. " >> $LOGFILE
    mail -s "Backup log `date`" [email protected] < $LOGFILE # Email the output to me.
    fi

  • Only CreateException allowed for create in local home?

    I tried to deploy a simple application in Weblogic Server 8.1. During verification I got the message: "Method create(int) on the local home interface must not throw java.rmi.RemoteException" and sometimes "create(int) must throw CreateException".
    The signature of my local home for that stateless session bean looked like this:
    create(int aNumber) throws CreateException, IOException {...
    the according method of the bean was:
    ejbCreate(int aNumber)throws CreateException, IOException {...
    After several tries i deleted the IOException from both signatures and the .ear file could be deployed.
    I looked up ejb 2.0 and 2.1 specification and there are examples throwing more than CreateException in local home interfaces of session beans (e.g. chapter 6.3.1).
    Did someone experience this behavior as well? Can there be a bug in my code and this "workaround" works only by accident?

    Here is the log massge
    [Sun Sep 16 14:26:47 2012] [error] [client ::1] File does not exist: /home/lucas/www/favicon.ico
    [Sun Sep 16 14:26:47 2012] [error] [client ::1] client denied by server configuration: /home/lucas/www/test/application/captcha/1347816281.8856.jpg

  • Obtaining a reference to local home interface

    When I do a JNDI look-up for the local home interface, I get back an object whose class is "MyBean_b2yw37_LocalHomeImpl". I expected it to be "MyHome" which is the local home for MyBean.
    Can someone please tell me how to fix this issue?
    Thanks!

    MyHome is an interface. You'll receive a class which implements your interface. The class is generated by the container. It has a funny name so that we can guarantee that it doesn
    collide with other beans.
    -- Rob
    A D wrote:
    When I do a JNDI look-up for the local home interface, I get back an object whose class is "MyBean_b2yw37_LocalHomeImpl". I expected it to be "MyHome" which is the local home for MyBean.
    Can someone please tell me how to fix this issue?
    Thanks!--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    [att1.html]

  • Change Network Home Folder to Local Home Folders

    Hello and Thanks in advance for your help.
    I created a mac network in our school this year. This is used for a video editing lab of 14 iMac's. I used a Mac Xserver with Server 10.5.7 on it and my clients are also 10.5.7. I upgraded my server hard drives to three 1TB hard drives in RAID 0 array. I created my users and decided to use true network homes so the students could use any mac in the lab at any given time. The Server has two Gigabit connections to it. This setup works great until you get more than 5 users at one time importing and editing videos. I believe the servers Hard Drives could not keep up with the data streams for multiple users and video editing.
    What is the easiest way to switch the students network home folders to local home folders on the iMacs? I tried it with a dummy account that I've been using from the beginning but when I try to change the mobility preferences in WGM to create a mobile account at login and use default syncing I get 2 different error messages.
    Either error while saving 14006 Or Error while saving 14084
    Sometimes an error about DSutil.cp line 712 comes up as well.
    Is it possible to have the students current Network Home folders sync to a local iMac and then switch them to use local home folders only? I'm trying to keep the students from losing the last few weeks of work.
    Should I try to use the create mobile account on the actual iMac instead of in WGM on the server?
    Thanks again,
    Mitch

    Thanks for the info Tony.
    Just for other people who are looking for answers to this problem I'll give my specifics.
    14 iMac workstations
    1 XServe server upgraded w/ 3 1TB WD Caviar Black drives RAID 0
    All networked using 1 Cisco Gigabit switch
    1 GB to each iMac
    (2) 1 GB connections to the Server
    The original true network home folders worked out okay for Final Cut Pro users. About 6 could work at the same time, capturing and editing their work. For iMovie HD only about 3 could use it at the same time.
    I could not get iMovie '09 v 8.0.5 to import to the network homes. Something about video library errors if I remember correctly. So I went back and they have been using iMovie HD with no problems.
    There was a lot of dropped frames and time wasted on importing with time code brakes.
    This is where I decided to create mobile accounts for each student on a specific computer set by the teacher. As stated about it will take about 3 minutes per GB of data to copy from the server to the local computer. Near the end of the student list (about 70) it would copy the data fairly quickly and then would sit at 100% for about 7+ minutes before It would finally complete and log off.
    The login sync still only takes about 1 full minute and the logout usually takes 1 minute but can sometimes take up to 3 depending on how much capturing they have done.
    After about 2 full weeks of use, this solution still seems very viable. There have been no complaints about dropped frames or lag while capturing. There is also no lag while using iMovie HD (which was very problematic before) during editing and playback. This is still great because at the end of the day they still have a mobile account and can access their data from any mac, besides the one they have a mobile account setup on. Also, if something happens to the server they can still login to the computer with their mobile account and still accomplish work and when the server is back up it will automatically sync on the next login.
    I'm not sure if it was the network or hard drive speed causing the lag. My server will only hold 3 SATA drives and they had to be configured for 1.5 instead of 3.0. The RAID was also setup w/ apple software and was not a hardware card.

  • LDAP with local home directory?

    Greetings.
    I'm trying to configure the Macs to authenticate based off of the LDAP server. I'm pretty sure I've got that part working, but I'm running into difficulty figuring out how to specify using a local home directory template rather than an NFS / AFP portable home directory. All the guides on the internet out there seem to want to use NFS, which we don't have setup (and don't intend to).
    Based on instructions of various texts, manuals, and blogs, I've created a user account called "labuser", and a group called "users", and then given any member of the group "users" write-access to the folder /Users/labuser. This way they login to a default home directory (at least for now). What information do i specify for LDAP's "apple-user-homeDirectory" entry to make it look for this /Users/labuser folder rather than an NFS share?

    So basically I should add C:\Documents and Settings instead of /Users for windows accounts?
    Because if I don't specify anything it creates a roaming profile on the windows machine, and puts the user directory both on the windows machine and a copy on the server under /Users/Profiles. Or at least is what is doing now... so I manually have to change the profile to local on the windows machine and delete the folder on the server...

  • Disabling local home directories breaks the software update

    Hello,
    I have my mac authenticating to a win2003 server and have disabled the local home directories but now the software update gives an error when it tries to download to the networked home directory library...etc....I have checked and rechecked the permissions... has anyone else had this problem?
    All suggestions welcome.
    Thanks
    Lori

    Well, after several hours on the phone, I'm convinced that somehow my ISP is blocking the Software Update address. Soft. Update works when I connect to other networks.
    I asked Apple for the address that Software Update is trying to connect to, but they wouldn't give it to me. Privacy and Security issues for them, apparently. Consequently, I don't have a web address to Ping. That was a good idea , though. My ISP couldn't seem to help me. So, at this point I'm not sure what else I can do except...
    In a month, my satellite internet provider is sending a stand alone sat-modem that I'm going to use instead of the set up I have now: involving a USB modem and sharing the internet connection through a specific computer that always has to be on and connected. (the satellite internet is a "one way" system that uses dial-up for the uplink and comes high-speed back down through the satellite) This new modem will serve as the dial up modem and also has two ethernet connections so I can send one directly to my router and the other to my wired desktop. I hope by taking the host computer out of the equation I'll also solve this issue. Who knows.
    Anyway, thanks for the info. I appreciate your feedback and if you have any other ideas, I'd love to see them.
    ben kaufmann

  • Local home directories vs network home directories?

    We have an existing linux server which handles web, ftp, dhcp and email for our design group. I am planning the integration of a new mac os x server to handle shared work folders, client archives, shared resources (stock images etc) with eSATA raids as a fail over back up. I have been doing a lot of reading and research, but have not arrived at a best solution for local vs network homes. Our users never connect from another mac workstation, and so utilize a number of iLife content mgmt apps. They all have large personal photo libraries, music libraries etc on their workstations. In addition, many of our projects involve working on extremely large photoshop files, video files etc. I am leaning towards leaving these users as local homes as there is concern over performance on the network. Pros? Cons? am open to any input before establishing final plans for osx server services.
    Network is cat 5e ethernet with 3 gigabit switches (one on each floor of a 3 storey building with an uplink between ea floor)
    more macs than I can list   Mac OS X (10.4.8)  

    Is the local home with synchronization of
    selected folders a variant of mobile home? or mobile
    user? (newbie osx server admin, still digesting the
    apple manuals!!
    Ok what I believe your asking is can you sync your portable home directory ~/shortname to the Server /HomeDir/shortname and ignore the lets say ~/shortname/Pictures or Music Directory? Since you only want Work related files on the Server and only have to backup 1 big user directory with only work related file on the server? Well the answers is a big YES .
    What is required takes a bit to setup. Heres a quick list of things to do and that need to be in place for it to all work smooth.
    1. OS X Server Software with OD/LDAP setup 10.4.3 or higher!
    2. All Client 10.4.3 or higher and binded to the OD/LDAP Server.
    3. Setup Workgroup Admin/Preferences Management. You can set rules for a Group or individual Users. Groups being the preferred way. In here you can set the Path to the Files & Folders to ignore during the Sync. You can do lots of other MCX Managed client settings here and if your OD/bind is good it works great.
    4. You'd have to move stuff around on the Local units i.e. ~/oldfiles to New ~/shortname which will be created. There a few way to do this and hold Permissions and all that just read about Mobile homes more. Think of it as a Laptop connecting for the first time to a binded OD server. Lots of folks have different ways.
    My clients also work with Large files (PS, ID, ai) and a network home was a bit of a pain. To be honest it's not the large files that get you it was the BS cache files that slow it all down. There are now work arounds for the performance hit but took time for the community to figure it all out. I had them in 10.3 working on files in the /Users/Shared/ directory and moving finished work back to the server after.
    10.4 has been the saviour of my sanity with mobile homes. Servers Fast Clients Fast, I have full control of clients (<--admin god complex), and all lived happily ever after... for the most part.

  • Network users w/ local home folders

    Hi,
    I have a basic question that I can't find a clear answer to. How do I create a network user account (through open directory) and specify a home folder to be created on the local machine (users are nearly all at stationary workstations)?
    The documentation all says that it is possible but not exactly how. Maybe I'm missing something obvious?
    Thanks,
    Sb

    Hi
    Clients should be bound to Open Directory and be using the OD Master for their DNS. Launch WorkGroup Manager and authenticate to the LDAP node. If you have only a few Users you can do it at that Level if hundreds do it at Group Level. Select Preferences > Mobility. It's fairly obvious thereafter.
    After the home folder has been created you can make that account a local administrator if you wish.
    This assumes the Server has been configured as Advanced. Please don't take this advice if you've used anything else.
    Tony

  • Network accounts with local home folders

    First of all sorry for my bad english.
    I want to obtain network accounts with local home folders.
    I have found this post very interesting to solve my problem.
    http://discussions.apple.com/message.jspa?messageID=2140595#2140595
    Following this indications I have obtained it but I dont see the Public folder of any home folder from the network.
    How I can solve this? I must share the Public folders manually? How? I have proven with SharePoints 3.5.4 and I have not obtained it.
    Thanks
    iMac Intel Core Duo   Mac OS X (10.4.6)  

    Hi
    Clients should be bound to Open Directory and be using the OD Master for their DNS. Launch WorkGroup Manager and authenticate to the LDAP node. If you have only a few Users you can do it at that Level if hundreds do it at Group Level. Select Preferences > Mobility. It's fairly obvious thereafter.
    After the home folder has been created you can make that account a local administrator if you wish.
    This assumes the Server has been configured as Advanced. Please don't take this advice if you've used anything else.
    Tony

  • AD mobile account with local home directory

    I basically have the same question as this post:
    http://discussions.apple.com/message.jspa?messageID=696367
    I have set up Tiger workstations to authenticate to AD, I am forcing a local home dir. Everything works great. I want to do the same thing for Tiger laptop users with mobile accounts. The problem is that OS X creates a second home directory outside of /Users based on attributes from my AD schema. Just like with the non-mobile users, I want to ignore all home dir attributes from AD and just use the user's home dir that is in /Users. So the question is, how can you use a mobile account and force a local home dir with Apple's AD plugin??????

    Yes, I know how to click buttons in the gui, that does not fix the issue. The issue is that the Active Directory schema at my company includes extended attributes from the RFC 2307 schema. Apple's AD plugin does not know how to handle this extended schema especially when using mobile accounts.
    Apple's AD plugin reads these unix attributes from AD and thinks it knows what to do but ends up causing more problems then if there were no unix attributes at all.
    Since this post, I have opened a ticket with Apple. They were able to recreate the problem in their lab with their AD server. The only work around is to create a custom ActiveDirectory.plist file that forces the Mac to ignore what AD is telling it.
    This solution works unless the ActiveDirectory.plist file is deleted or corrupted. This problem will only become worse once Microsoft includes all of the RFC 2307 schema in their next service pack of Win 2003 server.

  • How can I connect my iPad3 to my local home network?

    How can I add my iPad3 to my local home network?

    Wifi network? Tap on the settings icon. Choose the name of your network, tap on it, follow the on screen prompts to sign into the network.
    If it's not wifi, then you can't. The iPad doesn't support wired internet

  • Lookup for local home interface

    Hi!
    I am using the j2eesdk and there is a thing I cannot find anywhere:
    When I use a local interface for a bean and define an EJB Ref on that bean in the 'deploytool', I cannot specify a JNDI name (only a bean name). Therefore I cannot map the coded name in my Context-lookup() call in the code to any JNDI name on the applications 'JNDI Names' tab.
    My question is:
    - how do I lookup local home interfaces?
    - if this is done via JNDI, how do I do this in the deploytool?
    Kind Regards
    Ralf

    Hi
    The point u all should understand is you use a jndi name in your programs
    say
    public static void main(String[] args)
    InitalContext ctx = new IntialContext();
    ctx=(Context)ctx.lookup("java:comp/env");
    DemoLocalHome home = ctx.lookup("ejb/DemoBean");
    in the above program you use "ejb/DemoBean" as a reference name, but actually there won't be a Bean registered with that name. so, when u deploy the appclient u should map the reference name with the actual JNDI name ( if it's a remote interface) or with the class name (Local interface)
    so, when u deploy the appclient in the "ejb ref " tab, u specify that it uses Local interfaces and in the end u don't map the refernce name to a JNDI name( because it's a local interface) and rather u speciy the class name.
    that's how u map the references for Remote and Local home interfaces.....
    thank's for listening to that......
    for more suggestions mail me at [email protected]

  • Network user can't see local home directory

    Hi there,
    I have a Mac Mini running Lion Server with Directory Services turned on. I've been using this to allow network users to log into Lion clients, as well as set up mobile accounts. This has been working fine.
    Now I've just created a new network user for use with a Mountain Lion client and have experienced some strangeness with this new user's home directory. The binding to the directory was fine, and the credentials for the network user were fine. However, when logged in, this new user has his home drive mapped to /Network/Servers/<servername>/Users/<username> rather than the expected /Users/<username>. This has bad side-effects. For instance, Chrome tries to save downloads to the server instead of locally.
    What I can't work out is why the home directory isn't pointing to a local location. The other users (on Lion) have the same home directories defined in their Open  Directory profiles. The only difference is the new user is on Mountain Lion, but I don't think this has any bearing to the problem.
    Can anyone offer some advice?
    Benjamin

    So I took my Mac Mini running OS X 10.8 Server, along with two client laptops: one exhibiting the problem I described, and the other where network logins and home directories worked as intended.
    Long story short, the guys at the Bar couldn't figure it out. The user definitions in Open Directory seemed ok, but they still couldn't work out why no local home directories were being created. Not sure if this helps, but in trouble-shooting, we also discovered that trying to login with a network user on the problematic laptop didn't work when the server wasn't on the network. It's as if the server is required to be present.
    Anyway, the case has been referred to the business team, which is supposed to have more expertise with OS X Server.

Maybe you are looking for

  • Navigation Attribut is not shown in two rows in the Query

    Hello, we are using a multiprovider with the infoobject 0material. In the multiprovider we use a navigation attribut MH_PR_ST of 0material. Normally, the query rows should show the material number and the corresponding attribut MH_PR_ST, but in some

  • Units of transfer functions

    Hi I want to implement a first order model using the simulation module of LabVIEW. I'm using a fixed step ODE solver with step size of 0.1s and I have set the simulation loop period equal to the step size (100ms). Do transfer functions have a predefi

  • Error when compiling orchestration project

    This is driving me nuts and I hope someone can help. I have a orchestration project and one of the orchestration uses request-response direct bound ports. Message sent to this port will be transformed to a wcf request on a send-receive port configure

  • MDT Deployment Wizard doesn't start after booting from the LiteTouchPE.iso

    Hello Experts, I'm using the MDT 2013. When I boot the Physical machine or VM with the LiteTouchPEx86 or x64, I'm not getting the Deployment Wizard. It just stops with a command prompt X:\Windows\System32>. Anyone faced this problem earlier. I search

  • Unable to connect to inventory database ??

    Hi, Thanks for reading this post. I have a problem with ZFD3.2 inventory that is driving me crazy ... I have a Inventory system set up at one of our customers with Netware 6 servers ZFD3.2 and an inventory database on Oracle. All systems are working.