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]

Similar Messages

  • 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]

  • 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

  • Wls 6.1 with ejb 2.0 Does it support  Local Home Interface

    Hi,
    According to the document of wlogic server 6.1 sp2 for window,
    it supports EJB 2.0.
    When I built the bean(2.0 not 1.1) using local interfaces: EJBLocalObject and
    EJBLocalHome, they are successfully built fine, but when I deploy the Application
    they failed because of my interfaces did not "extends" EJBObject and EJBHome and
    java.rmi.RemoteException is required.
    When I extends the local interfaces the java.rmi.RemoteException will not be
    thrown (it is local)so it is not required but the weblogic 6.1 said it is required
    so I wonder the BEA WebLogic 6.1 sp2 supports the local interface.
    If it doesn't support Local interface, How could I do to get arround with this
    because Local interface is one of the new feature that talks in j2sdkee 1.3 with
    ejb2.0.
    Cheers,
    Tom

    Thanks Rob
    Tom
    Rob Woollen <[email protected]> wrote:
    >
    >
    It sounds like you have problems in your descriptors.
    Take a look at the examples/ejb20/bands. It demonstrates some EJBs with
    local
    interfaces in 6.1
    -- Rob
    Tom wrote:
    Hi,
    According to the document of wlogic server 6.1 sp2 for window,
    it supports EJB 2.0.
    When I built the bean(2.0 not 1.1) using local interfaces: EJBLocalObjectand
    EJBLocalHome, they are successfully built fine, but when I deploy theApplication
    they failed because of my interfaces did not "extends" EJBObject andEJBHome and
    java.rmi.RemoteException is required.
    When I extends the local interfaces the java.rmi.RemoteExceptionwill not be
    thrown (it is local)so it is not required but the weblogic 6.1 saidit is required
    so I wonder the BEA WebLogic 6.1 sp2 supports the local interface.
    If it doesn't support Local interface, How could I do to get arroundwith this
    because Local interface is one of the new feature that talks in j2sdkee1.3 with
    ejb2.0.
    Cheers,
    Tom--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    It sounds like you have problems in your descriptors.
    <p>Take a look at the examples/ejb20/bands.  It demonstrates some
    EJBs with local interfaces in 6.1
    <p>-- Rob
    <p>Tom wrote:
    <blockquote TYPE=CITE>Hi,
    <p>   According to the document of wlogic server 6.1 sp2 for
    window,
    <br>it supports EJB 2.0.
    <br>   When I built the bean(2.0 not 1.1) using local interfaces:
    EJBLocalObject and
    <br>EJBLocalHome, they are successfully built fine, but when I deploy
    the
    Application
    <br>they failed because of my interfaces did not "extends" EJBObject
    and
    EJBHome and
    <br>java.rmi.RemoteException is required.
    <p>   When I extends the local interfaces the java.rmi.RemoteException
    will not be
    <br>thrown (it is local)so it is not required but the weblogic 6.1 said
    it is required
    <br>so I wonder the BEA WebLogic 6.1 sp2 supports the local interface.
    <p>  If it doesn't support Local interface, How could I do to get
    arround with this
    <br>because Local interface is one of the new feature that talks in j2sdkee
    1.3 with
    <br>ejb2.0.
    <p>Cheers,
    <p>Tom</blockquote>
    <pre>-- 
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com</pre>
     </html>

  • Unable to deploy EJB 3.0 on JBoss 4.0.4GA - no home interface

    I am stuck in that my EJB3.0 project (one entity bean, one session bean and one client test bean) builds OK but somehow Eclipse Europa is unable to deploy it to JBoss (4.0.4 GA and 5 Beta) -- something to do with JNDI error as it involves javax.naming exceptions.
    My Eclipse directory structure is :-
    Titan (project name)
    |
    ejb - com.titan (package name)
    | |
    | domain -> Cabin.java (my entity bean)
    | |
    | travelagent -> TravelAgentBean.java
    | -> TravelAgentRemote.java
    |
    META_INF -> ejb-jar.xml
    -> MANIFEST.MF
    -> persistence.xml
    My ejb-jar.xml is :
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <display-name>Titan</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <session >
    <display-name>TravelAgentBean</display-name>
    <ejb-name>com/titan/travelagent/ejb/TravelAgentBean</ejb-name>
    <remote>com.titan.travelagent.ejb.TravelAgentRemote</remote>
    <ejb-class>com.titan.travelagent.ejb.TravelAgentBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    And my persistence.xml is :
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="Titan">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <class>com.titan.domain.Cabin</class>
    <properties>
    <property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver" />
    <property name="hibernate.connection.url"
    value="jdbc:oracle:thin:@localhost:1521:XE" />
    <property name="hibernate.connection.username" value="SYSTEM" />
    <property name="hibernate.connection.password" value="Swordfish1" />
    </properties>
    </persistence-unit>
    </persistence>
    I right-click on the Titan project name and choose Build Project. I get the following error message :-
    13:01:06,046 WARN [verifier] EJB spec violation:
    Bean : com/titan/travelagent/TravelAgentBean
    Section: 7.11.2
    Warning: A Session bean must implement, directly or indirectly, the javax.ejb.SessionBean interface.
    13:01:06,046 WARN [verifier] EJB spec violation:
    Bean : com/titan/travelagent/TravelAgentBean
    Section: 7.11.3
    Warning: A Session bean must define at least one ejbCreate method.
    13:01:06,046 WARN [verifier] EJB spec violation:
    Bean : com/titan/travelagent/TravelAgentBean
    Section: 7.11.1
    Warning: The session bean must implement either a remote home and remote, or a local home and a local interface or a service endpoint interface.
    13:01:06,062 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/Titan.jar
    I don't understand, because as of EJB 3.0, you don't really need a home or local-home interface anymore...

    Using @SecurityDomain("exemplo1") in my EJB and NOT providing jboss.xml, it works.
    @SecurityDomain("exemplo1")
    @RolesAllowed("yyy")
    @Stateless(name="UserManagement")
    public class UserManagementBean implements UserManagement {
      public void add(User user) {
    }Damn! This is some serious shit... I don�t want to configure this in every single EJB.
    EJB 3.0 is nice, but some small trivial details like this and others, that was forgotten by Sun, piss me off!

  • 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

  • Home vs. local-home

    All,
    I was wondering if there is any difference in terms of code between a home interface for a bean and a local home interface for a bean? Do I need any additional code for either of them, or is the behavior strictly governed whether or not I use <home> vs. <local-home> in my descriptor files?
    Thanks,
    -Dave

    All,
    I was wondering if there is any difference in terms
    s of code between a home interface for a bean and a
    local home interface for a bean? In terms of Code in those interfaces, LocalHome Interface throws
    --> Finder Exceptions for finder methods
    --> Create Exceptions for create methods
    where as Home interfaces being there for remote clients they throw
    --> Finder & Remote Exceptions for finder methods
    --> Create & Remote Exceptions for create methods
    Do I need any additional code for either of them, or is the behavior
    strictly governed whether or not I use <home> vs.
    <local-home> in my descriptor files?Well whatever IDE you are using should be generating those interfaces for you when you compile the bean class.
    >
    Thanks,
    -DaveAs for including the home/localhome interfaces it depends on who is accessing those interfaces for that particular bean. If you have a remote client ( basically anything other than the beans in your application ) accessing them then you will use remote interfaces .. meaning the home interface.
    If they are local clients then use localhome
    Regards,
    Meka Toka

  • 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

  • How to find out local or home interface  was used ?

    Hi !
    are there any ways in the code of methods ejbCreate and ejbRemove in my entity EJB to find out were they called via local or home interface provided that my bean has both local or home interfaces ?
    Thenks in advance.

    Why should you care, this logic should only be implemented in the client (SEJB or Servlet). Even then it should only be used to check if there is a LocalHomeInterface. If not you get the RemoteHomeInterface. I don't understand the question completely.

  • ClassNotFound while narrowing JNDI ref to ejb home interface

    Hello everybody
    I'm quite new to BEA WebLogic. I deployed Jasmine application on Bea WLS7 (example
    app from Mastering EJB 2). But when i tried to use login servlet, it threw an
    exception ClassNotFound when narrowing ejb home interface (obtained via JNDI).
    EJBs are in .jar file, and web files are in the .war file, maybe this is the problem.
    Should I copy ejb classes to .war file, or make some tricks with CLASSPATH, or
    maybe there is better way to make it work (maybe via J2EE references or something
    like this).
    Thanks in advance

    Strange. And you do not have any application classes in the system
    classpath?
    Konrad R. <[email protected]> wrote:
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Did you deploy ejbs and war in the same ear?
    Yes, both were packed up into one .ear archive>>
    Konrad R. <[email protected]> wrote:
    Hello everybody
    I'm quite new to BEA WebLogic. I deployed Jasmine application on BeaWLS7 (example
    app from Mastering EJB 2). But when i tried to use login servlet, itthrew an
    exception ClassNotFound when narrowing ejb home interface (obtainedvia JNDI).
    EJBs are in .jar file, and web files are in the .war file, maybe thisis the problem.
    Should I copy ejb classes to .war file, or make some tricks with CLASSPATH,or
    maybe there is better way to make it work (maybe via J2EE referencesor something
    like this).
    Thanks in advance--
    Dimitri

  • Unable to bind EJB Home Interface to the JNDI name

    Why do I get this error?? What is the jndi-name in weblogic-ejb-jar.xml
    Unable to deploy EJB: OrganizationEJB from sempire_bc.jar:
    Unable to bind EJB Home Interface to the JNDI name:
    com.sempire.builder.business
    _component.Organization. The error was:
    javax.naming.NameAlreadyBoundException: Organization is already bound;
    remaining
    name 'com.sempire.builder.business_component'
    <<no stack trace available>>

    Slava,
    In case I change the name of the jndi name to a unique name. I still get the same
    problem. I checked for multiple occurences, but there aren't any.
    My web.xml file is:
    <ejb-local-ref>
    <description>
    Reference EJB resources in Weblogic Resources
    </description>
    <ejb-ref-name>GangsterEJB</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>com.sempire.builder.business_component.GangsterHome</local-home>
    <local>com.sempire.builder.business_component.Gangster</local>
    </ejb-local-ref>
    My weblogic-ejb-jar.xml file is:
    <weblogic-enterprise-bean>
    <ejb-name>GangsterEJB</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/GangsterDB</res-ref-name>
    <jndi-name>oraclePool</jndi-name>
    </resource-description>
    </reference-descriptor>
    <local-jndi-name>Gangster_test</local-jndi-name>
    </weblogic-enterprise-bean>
    I do not get the problem.
    Thank you
    Ronak Parekh
    "Slava Imeshev" <[email protected]> wrote:
    Hi Ronak,
    This exception means that you already have a bean
    with the same JNDI name. Search your weblogic-ejb-jar.xml files
    for multiple occurrences of the name and fix the problem.
    Regards,
    Slava Imeshev
    "Ronak Parekh" <[email protected]> wrote in message
    news:[email protected]...
    Why do I get this error?? What is the jndi-name in weblogic-ejb-jar.xml
    Unable to deploy EJB: OrganizationEJB from sempire_bc.jar:
    Unable to bind EJB Home Interface to the JNDI name:
    com.sempire.builder.business
    _component.Organization. The error was:
    javax.naming.NameAlreadyBoundException: Organization is already bound;
    remaining
    name 'com.sempire.builder.business_component'
    <<no stack trace available>>

  • Remote and Home Interfaces

    Why do we need a home interface and remote interface for a ejb.
    Must these interfaces be there for each ejb?

    Why do we need a home interface and remote interface
    for a ejb.The Home interface is like a factory for getting to your beans. The remote interface is what you use to speak "directly" to the bean. It's remote because the bean is usually on a remote server somewhere (not in the same VM as your client code). The same is true for the home interface in terms of it being remote.
    The corresponding LocalHome and Local interfaces are for use when the bean in question is not remote.
    Must these interfaces be there for each ejb?You need either a Home and Remote or LocalHome and Local interface for all beans except Message Driven Beans.

  • FileGeneration/Wlappc not including local ejb interfaces in client jar

    With the following setting in the EJB source:
    @FileGeneration(
              remoteClass = Constants.Bool.TRUE,
              remoteHome = Constants.Bool.TRUE,
              remoteClassName = "ReportService",
              remoteHomeName = "ReportServiceHome",
              localClass = Constants.Bool.TRUE,
              localHome = Constants.Bool.TRUE,
              localClassName = "ReportSvc",
              localHomeName = "ReportSvcHome")
              @JarSettings(ejbClientJar = "dist/ReportFacadeClient.jar")
              @JndiName(remote="service-ReportFacade", local="local-ReportFacade")
              @Session(maxBeansInFreePool = "100",
                        initialBeansInFreePool = "10",
                        transTimeoutSeconds = "0",
                        type = Session.SessionType.STATELESS,
                        defaultTransaction = Constants.TransactionAttribute.SUPPORTS,
                        ejbName = "statelessSession",
                        enableCallByReference = Constants.Bool.TRUE)
    Along with the "<ejb-client-jar>ReportServiceClient.jar</ejb-client-jar>" entry in the ejb-jar.xml
    the ant build script invocation of wlappc successfully creates the "dist/ReportFacadeClient.jar" file as specified which includes the Remote Home and Remote interface, however the local definitions are absent.
    It is confirmed that the wlcompile does create the local implementation and interface files, they are just missing from the client jar.
    Do I need to manually append them to the jar or is there a configuration setting that I am missing to have this done automatically as is is done
    for the remote interface?
    Thanks.

    Hi,
    the local interface and local home is for local client which is within the same application (.ear). So local client needn't any client jar. it can always load the classes (local interface, local home, etc. ) it needs.
    so there isn't needs to put local interface and local home to a client jar.
    the client jar is for client out of the application, and it will be a remote invocation certainly.

  • JSP Home Interface Problems

    Hi, I am havin some problems trying to create a home interface in a JSP from an enterprise bean, i am using the following code :
    <%!
         private AddressBook addressbook = null;
         public void jspInit()
              try
                   InitialContext ic = new InitialContext();
                   Object objRef = ic.lookup("java:comp/env/ejb/TheAddressBook");
                   AddressBookHome home = (AddressBookHome)PortableRemoteObject.narrow(objRef, AddressBookHome.class);
                   %> <%!
                   addressbook = home.create("a","a","a","a","a","a","a");               
              catch (RemoteException ex)
                System.out.println("Couldn't create AddressBook bean."+ ex.getMessage());
            catch (CreateException ex)
                System.out.println("Couldn't create AddressBook bean."+ ex.getMessage());
            catch (NamingException ex)
                System.out.println("Unable to lookup home: "+ "AddressBook "+ ex.getMessage());
         public void jspDestroy()
         addressbook = null;
    %>
         <%
         addressbook01 = home.create("b","a","a","a","a","a","a");
         %>However i cannot access the home interface in the body of the JSP, i.e. where addressbook01 is trying to be created. Does anyone know a way around creating the home interface so that it is accessible in the body of the JSP?
    cheers

    Milan,
    I will attempt to answer some of your questions. Others I need a little more detail on:
    1. There isn't a way to run a JSP directly from JDeveloper to TomCat. Our internal server, Web-to-Go, is what we provide for local testing and debugging.
    We do, however, support remote debugging JSPs against TomCat. You can find out more about how to set this up from the online help, and also from the JDev 3.1 Remote Debugging Online Demo Walkthroughs available on the JDeveloper OTN page.
    2. I'm not sure why this is happening, but I would just answer 'No', if your edits are getting wiped out. I have not experienced this problem myself when I select 'Yes'.
    3. Are these JSP files that JDeveloper has created (i.e. via the JSP Web Application Wizard), or ones you created yourself? Does this happen each time you open the project? What are your HTML source and root directories set to in your Project Properties? Are the JSP files located there?

  • JNDI lookups of home interface

    JNDI lookups are expensive timewise. Our question is ... would it be
    pratical to lookup all our EJB Home interfaces once at startup and store
    these references in a global class accessible to all clients? These home
    interfaces then become readily available factories for acquiring instances
    of remote interfaces. Is there anything wrong with this picture? Is this a
    problem because these home stubs are not reentrant and may be accessed
    concurrently by more than one client? Is there a problem with have one home
    reference create multiple remote references of an ejb?
    Any light that can be shed on this question wouls be appreciated.
    Thanks.
    tiffany
    San Diego

    I'm using a Singleton class to cache HomeInterfaces. The first time a
    HomeInterface is requested, the JNDI lookup is done, after that, all
    requests to that HomeInterface are handled by the cache. Works great, no
    problems. AFAIK there are no problems with storing the HomeInterface
    reference and reusing it.
    Hope that helps,
    Nils
    Tiffany wrote:
    >
    JNDI lookups are expensive timewise. Our question is ... would it be
    pratical to lookup all our EJB Home interfaces once at startup and store
    these references in a global class accessible to all clients? These home
    interfaces then become readily available factories for acquiring instances
    of remote interfaces. Is there anything wrong with this picture? Is this a
    problem because these home stubs are not reentrant and may be accessed
    concurrently by more than one client? Is there a problem with have one home
    reference create multiple remote references of an ejb?
    Any light that can be shed on this question wouls be appreciated.
    Thanks.
    tiffany
    San Diego--
    ============================
    [email protected]

Maybe you are looking for