Have to ask again:when to use ejb-ref ?

hi, I asked this last week but nobody answered it.
i am really curious about it and i checked some docs it said " it is useful
coz beans can look each other up without needing to initialize JNDI to any
particular driver".
i wonder what means particular driver and when there will be great
difference between using and not using.
thanx in advance
Ciao,
zhxt

In WLS you can have either global JNDI names that are visible throughout
the server or JNDI names that are local to your application.
The recommended best practice these days is to use ejb-refs and/or
ejb-links to lookup your EJBs. For local EJBs, you don't need to have a
global JNDI name since they are not visible to other applications.
-- Rob
scratchback wrote:
hi, I asked this last week but nobody answered it.
i am really curious about it and i checked some docs it said " it is useful
coz beans can look each other up without needing to initialize JNDI to any
particular driver".
i wonder what means particular driver and when there will be great
difference between using and not using.
thanx in advance
Ciao,
zhxt

Similar Messages

  • When to use ejb-ref?

    if i do not write <ejb-ref> in ejb-jar.xml,what will happen?the application
    can not run or performance is low?
    and is there any difference between bmp and cmp?i mean "does cmp need
    <ejb-ref>?"
    Ciao,
    zhxt

    In WLS you can have either global JNDI names that are visible throughout
    the server or JNDI names that are local to your application.
    The recommended best practice these days is to use ejb-refs and/or
    ejb-links to lookup your EJBs. For local EJBs, you don't need to have a
    global JNDI name since they are not visible to other applications.
    -- Rob
    scratchback wrote:
    hi, I asked this last week but nobody answered it.
    i am really curious about it and i checked some docs it said " it is useful
    coz beans can look each other up without needing to initialize JNDI to any
    particular driver".
    i wonder what means particular driver and when there will be great
    difference between using and not using.
    thanx in advance
    Ciao,
    zhxt

  • I have "CC" now but when I use CS6 it prompts me for my serial #, why?

    I have "CC" now but when I use CS6 it prompts me for my serial #, why?

    Ask for serial number http://forums.adobe.com/thread/1234635 has a FAQ link
    or
    Online Chat Now button near the bottom for Activation and Deactivation problems may help
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html

  • When not using EJBs can I make BD a Singleton and cache facade instances?

    Hi,
    In an application which does not use EJBs can I make BD(Business Delegate) a singleton?
    I was very sure about doing this but when I tried Google on the same subject the answers were'nt supportive of this but that was in the context of applications which used EJBs. And also item 4 in Effective Java isnt very supportive of caching Objects at the drop of a hat.
    When not using EJBs would it be an unnecessary thing to make BD a singleton and cahce Facade instances in a BD and DAO instances in a Facade? I am planning to use a array based blocking bounded buffer for the purposes of caching. Or would it be better to make both BD and a facade as SIngletons and just cache DAOs in a Facade?
    Any suggestion would be of good help to me.
    Thanks a lot.

    Not sure I understand all your design, but you seem
    to describe an architecture where requests are queued
    and handled serially.Sorry if I messed up while explaining it. No, it will not be handled serially. Since the BD is a singleton multiple threads can pass messages to it simulteanously, a bit like an object of the Action class in Struts. Since I dont see having any synchronized methods in a BD requests will be handled simulteanously.
    The impact on throughput of handling requests
    serially (as opposed to parallelizing them) probably
    outweights by far the cost of instantiating one more
    object per request...Yes, I understand that but as I explained above the reqests wont be handled serially.
    To be more clear, I am thinking of using any one of these two things:
    1) BD(Singleton)-->Facade(Singleton, caches DAOs in a thread safe data structure)
    2)1) BD(Singleton, caches Facade instances in a thread safe data structure)-->Facade(caches DAOs in a thread safe data structure).
    the thread safe data structure I am planning to have is a array based bounded buffer which blocks using wait and notify mechanism.
    Thank you for the reply.

  • I have IPhone 6 and when I using Viber Siri is actives itself ones I turn it off is actives my player itself as well. What can I do to stop that happen.

    I have IPhone 6 and when I using Viber Siri is actives itself ones I turn it off is actives my player itself as well. What can I do to stop that happen.

    Try turning off Siri in your Settings. Follow the steps on this page: http://www.imore.com/need-disable-notification-center-control-siri-access-lock-s creen-heres-how-ios-8
    If this doesn't help, try resetting your iPhone. This won't delete your data stored on the phone.
    Press and hold the Sleep/Wake button
    Press and hold on the Home button
    Keep holding both buttons until the display turns off and back on with Apple logo on it.
    Alternatively, you may go to Settings - General - Reset - Reset All Settings

  • Client using ejb-ref to lookup

    Hi,
         I read the docs, I searched for answers but there are still some things I don't
    understand regarding a stand alone client application to a weblogic server 8.1
    that could look up a bean using ejb-ref. I don't want to use the JNDI name.
         There is the client-application.xml and the MyClientJar.runtime.xml but i'm not
    sure I understand where to put them. I have the client-application.xml in my
    client jar, the runtime.xml one in the same directory like specified in the
    documentation, I tried to put the xml and the jar in my classpath and running
    the client, no success the client cannot lookup using ejb-ref
         I read that MyClientJar.jar should go in my ServerModule.ear so I did that too,
    still doesn't work.
         Something I'm not doing right or something I don't understand.
         Any help or comments appreciated
         Thank You
         Max

    Hi,
         I read the docs, I searched for answers but there are still some things I don't
    understand regarding a stand alone client application to a weblogic server 8.1
    that could look up a bean using ejb-ref. I don't want to use the JNDI name.
         There is the client-application.xml and the MyClientJar.runtime.xml but i'm not
    sure I understand where to put them. I have the client-application.xml in my
    client jar, the runtime.xml one in the same directory like specified in the
    documentation, I tried to put the xml and the jar in my classpath and running
    the client, no success the client cannot lookup using ejb-ref
         I read that MyClientJar.jar should go in my ServerModule.ear so I did that too,
    still doesn't work.
         Something I'm not doing right or something I don't understand.
         Any help or comments appreciated
         Thank You
         Max

  • Help needed - why we use ejb-ref element in ejb-jar.xml

    hi all
    can anyone tell me what is the purpose of this element in the ejb deploy descriptor? thanks

    Suppose u have bean A, which needs to look up another bean B. Normally you wud need to use the jndi lookup using the initial context to access the bean B's home interface. If you use ejb-ref element you dont need to know the JNDI name of bean B. You can use ejb-ref-name instead. So you can say this is a short cut method of looking up and getting a reference to a bean's home object.

  • Using ejb ref

    Hi !
    I made an Entity bean for a master table, make its local interfaces and deploy it in a seperate jar.
    Then i want to call this Entity bean thru any session bean using local interfaces and this session bean
    is in a seperate jar file.
    Right now its not working - i heard it can be used using <ejb-ref> tag.
    Can anyone tell me what all entries do i need to make for this :
    Do i need to write some code also for ti or only entries in deployment descriptor files will do ?
    and what all entries do i need to make in deplyment descriptors or entity and deployment descriptors of session beans.
    If somone has sample code then do please send across...
    Thanks in advance !!

    I tried the thing :
    I made an Entity Bean and a session bean in seperate jar files
    The ejb-ref entries in session beans deployment descriptor files are ::
    <ejb-local-ref>
         <ejb-ref-name>ejb/EmpLocal</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
         <local-home>EmpHomeLocal</local-home>
         <local>EmpLocal</local>
    </ejb-local-ref>
    Now, the code in session bean from where i am calling Entity bean is ::
    InitialContext initialcontext = new InitialContext();
    System.out.println("Initial Context created ");
    home = (EmpHomeLocal)initialcontext.lookup("java:comp/env/EmpLocal");
    System.out.println("After getting Local Home");
    But its giving me the following error in Session Bean
    Initial Context created
    java.lang.ClassCastException: EmpEJB_1huw_LocalHomeImpl
    Can, anyone help me to call an Entity bean's local methods from a Session bean - bith in seperate jar files

  • Question about when to use EJB

    Hello All,
    Right now, I am tasked with taking data out of the database and storing it on the mid-tier. We will be storing this static data in an XML file. We were hoping to read it in when starting the server and then persisting the data for the life of the server. Is this a good time to user EJB? All I have seen is examples using a database. We would like to take the database hit out of the equation when it comes to retrieving this data, but would also like to avoid parsing the XML doc every time someone logs in to the application. Is EJB a good answer here, or is it overkill?

    If this is for use as a read-only dictionary for supporting an EJB application, by all means.
    But to use EJB just to do this - I think that would be overkill.
    A singleton would do the job fine - especially if the XML doesn't change - actually even if it does that doesn't matter.

  • When to use EJBs

    1) Does any one know where can I find documents that describe when EJBs should be used in an application? If I use a J2EE server like WebLogic, should I always try to use EJBS an my applications?
    2)Once I have decided to use EJBs in an application, should there be an entity bean corresponding to every table in the database??
    thanks

    Hi
    Well documentation can be found on sun's site and for EJB regarding the number based on table is not required.
    I have a project which had around 30 Tables in it and we were using EJB's for it and had grouped EJB's based on table or functionality.
    You could also make EJB's based on the tables logical grouping and can work it out.
    Based on that you can define ur Interface.
    Bye

  • I have os 10.5.8 and safari 5.0.6 and websites are coming very strange. Do I have flashback virus? When I use firefox they come up normal. what can I do?

    I guess I put all info at top, sorry. Websites are displaying strange. When I use firefox they come up normal. Do I have flashback virus? what do I do to correct problem.

    Thank you both for responding . After my posting I kept digging, I now know I don't have flashback. But, as to the strange part the pdf will  show. Before problem that started about 2 weeks ago. The content was spread across the web page now it's all to the left going straight down. Also each action I get a slow script message and action is only completed when I hit cancel.
    file:///Users/daniellacevedojr/Desktop/What%20is%20eMusic.pdf
    I hope this gives you more insight.
    Thank you for your attention.

  • EJB3 newbie - when to use EJB?

    If I just want to build a reusable module that does not have any business critical actions, such as a login module, or a blog module, should I use EJB?
    Also, am I correct that only EJBs can run on distributed servers, and that all other non-EJB components in a web applications can only run on a single server?

    If I just want to build a reusable module that does
    not have any business critical actions, such as a
    login module, or a blog module, should I use EJB?
    No. Any Java module can be made to be reusable, if designed to be so. Actually, by using EJBs, you'll be limiting the reusability of your modules, since those would need to run inside an EJB container.
    Also, am I correct that only EJBs can run on
    distributed servers, No, they can run in distributed as well as non-distributed environments.
    and that all other non-EJB
    components in a web applications can only run on a
    single server?No. Not sure where you got that idea from. I think you're confusing multiple server environment (clusters) with distributed[i] business objects. You can cluster applications that collocate all their components in a single JVM.
    There are actually very few cases where the use of EJB is to be considered (roughly 10% of cases):
    - if you really need object distribution - this is not the norm
    - if you need to use IIOP as the protocol for communication
    - MDBs are a good solution for some applications heavily based on messaging

  • When to use @Resource and when to use @EJB for dependency injection

    Hi,
    When do you use
    @Resource and when do you use @EJB for dependency injection?
    Thanks

    Captain obvious: Use @EJB for injection of EJBs, and @Resource for everything else.
    There was a discussion about this very topic quite recently, perhaps you can find it through the search.

  • I am using Firefox ver. 3.0.19 and I have Windows 7. When I use Firefox as a browser I cannot print my emails. I get an error message: "pcfax not availabe". If I use IE I have no problem printing the emails.

    I am using Firefox ver. 3.0.19 and I have Windows 7 which came with a new computer. When I use Firefox as a browser I cannot print my emails. I get an error message: "pcfax not availabe". If I use IE I have no problem printing the emails.
    == This happened ==
    Every time Firefox opened
    == From day 1 with the new computer about two weeks ago.

    It sounds like you have the wrong printer selected.
    When you get the Print window, pick another printer from your printer dropdown. You seem to have a fax printer selected instead of a physical printer.

  • When to use ejb's

    Hi there
    I just have the following question?
    What requirement would make you use ejb's?

    Hi there
    I just have the following question?
    What requirement would make you use ejb's?A single requirement? "Requirement 5. The system must use ejbs."
    (And I have seen a requirement that was basically like this.)
    Other than that it certainly can't be done with a single requirement.

Maybe you are looking for

  • Tab control usiong tool bar

    Hi! In my application i want show different graphs using tab control.How can i control the page selection  of tab cntrl.  using different buttons that i put up on my tool bar.Is there any property to this op.? Thanks DeWalker Solved! Go to Solution.

  • Item Hierarchies

    Hi, I am using Discover3.1 for the 1st time. I have created the joins accross the tables... Now i want to create item hierarchies. Pl. advice me what is the criteria for this. Like how shd i decide to create a hierarchy for each item. What kind of st

  • Exit for CJO2, Some fields should me only in display mode

    Hi Experts, I have to do certain field of CJ02 IN non EDITABLE MODE( Only Display) . Please suggest me which user exit can be used ? Rgds Mohit

  • XML export changes names of art

    I recently exported an InDesign file and noticed that the art names in the xml file had been truncated. Is there a character limit for the names of art (similar to the names of pdf files for ftp transfer)?? Thanks MG

  • Crypto errors CTM ERROR: Failed to allocate x bytes of memory

    Hi There. I am currently getting a strange error when trying to use and crypto services on our ASA 5520 (8.0.3) Initially I observed that a connected VPN had dropped. Then when I attempted to use ASDM or SSH I was blocked. In the end I opened telnet