@EJB annotation for injection and lazy relations

Hi,
I develop a ejb3/jsf application.
I have lazy relations in my entity beans.
I remark that in my managed bean of my JSF, if I use @EJB annotation to inject session bean, I have no problem on lazy on entity beans returned by this session bean.
Example
JsfManageBean{
@EJB
Bean sessionBean ...
public void doSomething(){
Department d = sessionBean.findDepartmentBy...
// relation lazy
d.getEmployees()
-> Load of employees -> NO LAZY PROBLEM !
Someone can explain me why it works ?
For me, after the find method, my session is closed !
If I do a lookup to find my session bean (and so no injection @EJB here) -> I HAVE THE LAZY PROBLEM !
public void doSomething(){
SessionBean = ... context.lookup("blablabla")
Department d = sessionBean.findDepartmentBy...
// relation lazy
d.getEmployee()
-> LAZY EXCEPTION
thanks for help !

Nobody please ?

Similar Messages

  • ConfigureCombined invoice for Delivery and Order related billing items

    Dear Guru's,
    Please tell us what settings one have to do in copy controls (like for TAS "OR to F2" & TAN "LF to F2") as to Combined invoice for Delivery and Order related billing items.
    Regards,
    Sai

    Hi Sai,
    for TAS "OR to F2"
    T-code-VTFA
    Target Billing Type --"F2"        and Source Document as "OR"
    At header level you can select .
    Copying requirements "001" Header/order related
    Tick mark copy item number
    At item Level you give
    Copy requirements "028" Order related 3rd party item
    Data VBRK/VBRP= 000
    Billing quantity="A"
    Pos/Neg quantity="+"
    Price type="G"
    and Save
    2)TAN "LF to F2
    Go to Tcode-VTFL
    Target Billing type "F2"   and source document as "LF"
    In header details you give
    Copy requirements "001" Header-order related
    detr export dta="B"
    Allocatio number="B"
    Reference number="A"
    Tick mark copy item number
    In item details you give
    Copy requirements"004" delivery related item
    Data VBRK/VBRP="003" Single invoive"
    Billing qantity="D"
    Pos/neg quant="+"
    Price type=G"
    Price source"E"
    Regards
    Seegal

  • Item category for delivery and order related billing.

    Hi All,
    I have am faceing one problem in QEC. My client having delivery related billing and order related billing. For we have maintain only one billling document(order related and delivery related).
    I have a item category in the sales order Zo09 for this item category system allowing the user to create both billing documents(order and delivery related) Please advise how i can stop the users to create delivery related and order related.
    but we have configured delivery related eventhough system allowing to create both billing documents.
    Please do needful.
    Thanks,
    KV
    Edited by: kv on May 8, 2009 11:54 AM

    Hi
    My client having delivery related billing and order related billing. For we have maintain only one billling document (order related and delivery related).
    What is the meaning of this statement ?
    Say in a single order or order type  say OR there can be two materials with different item categories say TAN and ZTAN and
    TAN with billing relevance as A( delivery related billing) and ZTAN with billing relevance as B (order related billing )
    If that happens the billing will be split
    In VOV8 we mention for OR the order related billing as F1 and delivery related billing as F2 in the billing tab
    Now in billing TAN will pick F2 as it is delivery related billing
    and
    ZTAN will pick F1 as it is order related billing
    Suppose in your sales doc type if you have mentioned both as F2 then also there will a billing split  in billing there will be two F2 invoices TAN will pick one  F2 invoice and ZTAN will pick another F2 invoice and this is a wrong way of doing things
    I have a item category in the sales order Zo09 for this item category system allowing the user to create both billing documents(order and delivery related) Please advise how i can stop the users to create delivery related and order related
    How can one item category can pick both  order related and delivery related billing?
    Not at all possible in SAP as we can mention only one control in the billing relevance field in item cat
    Your issue needs more clarity  about your problem for suggesting some suitable help
    Regards
    Raja

  • Progress dialogs for (eager and lazy) downloads

    <resources progress="all-downloads">
    </resources>
    Where 'progress' values are
    "standard" - default behaviour if omitted - progress
       dialog for eager downloads only
    "all-downloads" - progress dialog supplied for all
       downloads, eager or lazy.
    "none" - (suggest) no progress dialogsThe 'progress' attribute is not something in the
    web start API, but I would like to see it added.
    The intent is to allow the JNLP file to suggest a
    behaviour for progress dialogs during the download
    of both eager and lazy resources.
    Currently (web start in 1.5), there is no progress
    dialog, or message of any kind, during the download
    of 'lazy' resources.
    My questions.
    Is it technically feasible to provide this ability?
    Does it conform to the web start ..framework?
    Would an RFE to add support for this 'progress'
    attribute (call it what you like) be well received
    (or disappear into the abyss as some other
    requests assigned an ..'internal review ID'
    sometimes seem to)?
    More generally to other forum members, is
    this something that is important to you?
    Would you vote for an RFE to support the
    progress dialog attribute?

    ScheduleWorld used to use around 40 jars and I noticed a big speedup when I started using the version protocol. Now, my httpd logs only report a HTTP HEAD request on the jnlp file (sometimes icon image too?) and the app starts quite fast. I use less jars now but I am sure the main thing is the switch to the version protocol.
    With the version protocol, the client can determine if it has all of the right versions without making network connections. If you have a slow network connection (like a modem) and/or your server has keepalive disabled and is rate-limited to the number of new connections/second to the same IP you could see exactly what you are describing.

  • Request for PDFs and Links related to Payroll,ESS,MSS

    Hi Everyone,
    I new to SAP HR.I am intertested in learning Payroll,ESS,MSS.
    Could someone send me links and PDFs related to SAP HR Payroll,ESS,MSS.
    Please send the PDFs and links to
    anlkmarch at rediffmail
    Thanks in advance,
    Anil Kumar.
    Points will be awarded to suitable reply.

    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAESS/ESSIAC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYUS/PAPAUS_WS01000045.pdf
    Best Regards

  • Ejb 3 Dependency Injection and Deployment

    Dear all,
    I have two project. one is ejb_jar and another is ear.
    both deploy in same weblogic server with separate package.
    But i can't use DI with separate package.
    Why i can't use DI with separate package. it dosen't support?
    Or my code is wrong?
    ///// session bean
    @Stateless(name = "SessionEJB", mappedName = "stars21_web-Model-SessionEJB")
    @Remote
    @Local
    public class SessionEJBBean implements SessionEJB, SessionEJBLocal
    ///// client injection
    @EJB
    SessionEJB test;
    With Regards,
    WP

    These are my full log
    NFO: Cleaning up application state
    <Nov 4, 2009 5:23:49 PM SGT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1257326626033' for task '6'. Error is: 'weblogic.application.ModuleException: Could not setup environment'
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1361)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:408)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:182)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:48)
         Truncated. see log file for complete stacktrace
    weblogic.deployment.EnvironmentException: [J2EE:160200]Error resolving ejb-ref 'sg.com.stee.stars21.testing.Servlet1/registrationAuthorityFacade' from module 'stars21_web-stars21-context-root' of application 'stars21_web'. The ejb-ref does not have an ejb-link and the JNDI name of the target bean has not been specified. Attempts to automatically link the ejb-ref to its target bean failed because no EJBs in the application were found to implement the 'sg.com.stee.stars21.common.facade.RegistrationAuthorityFacade' interface. Please link or map this ejb-ref to its target EJB and ensure the interfaces declared in the ejb-ref are correct.
         at weblogic.deployment.BaseEnvironmentBuilder.autowireEJBRef(BaseEnvironmentBuilder.java:426)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:465)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3034)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1359)
         Truncated. see log file for complete stacktrace
    >
    <Nov 4, 2009 5:23:49 PM SGT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 9 task for the application 'stars21_web'.>
    <Nov 4, 2009 5:23:49 PM SGT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'stars21_web'.>
    <Nov 4, 2009 5:23:49 PM SGT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1361)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:408)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:182)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:48)
         Truncated. see log file for complete stacktrace
    weblogic.deployment.EnvironmentException: [J2EE:160200]Error resolving ejb-ref 'sg.com.stee.stars21.testing.Servlet1/registrationAuthorityFacade' from module 'stars21_web-stars21-context-root' of application 'stars21_web'. The ejb-ref does not have an ejb-link and the JNDI name of the target bean has not been specified. Attempts to automatically link the ejb-ref to its target bean failed because no EJBs in the application were found to implement the 'sg.com.stee.stars21.common.facade.RegistrationAuthorityFacade' interface. Please link or map this ejb-ref to its target EJB and ensure the interfaces declared in the ejb-ref are correct.
         at weblogic.deployment.BaseEnvironmentBuilder.autowireEJBRef(BaseEnvironmentBuilder.java:426)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:465)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3034)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1359)
         Truncated. see log file for complete stacktrace
    >
    [05:23:49 PM] Weblogic Server Exception: weblogic.application.ModuleException: Could not setup environment
    [05:23:49 PM] Caused by: weblogic.deployment.EnvironmentException: [J2EE:160200]Error resolving ejb-ref 'sg.com.stee.stars21.testing.Servlet1/registrationAuthorityFacade' from module 'stars21_web-stars21-context-root' of application 'stars21_web'. The ejb-ref does not have an ejb-link and the JNDI name of the target bean has not been specified. Attempts to automatically link the ejb-ref to its target bean failed because no EJBs in the application were found to implement the 'sg.com.stee.stars21.common.facade.RegistrationAuthorityFacade' interface. Please link or map this ejb-ref to its target EJB and ensure the interfaces declared in the ejb-ref are correct.
    [05:23:49 PM] See server logs or server console for more details.
    oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: Deployment Failed
    oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: Deployment Failed
    [05:23:49 PM] #### Deployment incomplete. ####
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:341)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:235)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:442)
         at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
         at oracle.jdevimpl.runner.adrs.AdrsStarter$6$1.run(AdrsStarter.java:1469)
    Caused by: oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.redeployApplications(Jsr88DeploymentHelper.java:627)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:315)
         ... 11 more
    Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.redeployApplications(Jsr88DeploymentHelper.java:608)
         ... 12 more
    #### Cannot run application stars21_web due to error deploying to DefaultServer.
    [Application stars21_web stopped and undeployed from Server Instance DefaultServer]

  • [b]how to use EJB QL for LIKE and ROWNUM[/b]

    Hi,
    i am using CMP EJB with OC4J server
    i face two problems in it when i make any query like
    select object(o) from Partymas o where o.stationCode like '?1' and o.rownum &gt;='?2' and o.rownum &lt;='?3' order by party_name
    then it shows error on rownum so i cant understand how to solve it
    second is when i use LIKE statment in EJB QL like this:-
    select object(o) from Partymas o where o.pinCode like '%?%'
    then it shows error so can any one help me
    thanks
    warm regards
    vikassheelgupta

    <ejb-ql>select object(o) from Partymas o where o.stationCode like '?1' and
    rownum >='?2' and rownum <='?3' order by party_name</ejb-ql>Try this:
    rownum >= ?2 and rownum <= ?3
    <ejb-ql>select object(o) from Partymas o where o.partyName like '%?%'</ejb-ql>Try this:
    like ?1

  • Work flow for PO and PR release

    Hi ,
    I am working in one of the implementation project , it's ECC 6.00 version  . I have some question ,
    1. Is it basic workflow pakage comes with ECC 6.00 .
    2. How to activate for PO and PR related release in MM, I need details about end to end configaration . We don't have any workflow consultant in project .
    If any one have configarion document for above please send .
    Regards
    RB

    Hi,
    Release of Purchase Order :WS20000075
    And for two levels of approvals you have to configure in SPRO the path is
    Purchase Order:
    SPRO> Material Management->Purchasing->/Purchase order-->Release procedure ---> Procedure with classification ---> set up procedure with classification ---> double click on Release strategies and Workflow.
    Purchase requisition release (WS00000038)
    similar configuration.
    Regards,
    N.

  • Whast is order related billing and delivery related billing?

    Explain about order related billing and delivery related billing
    thanks

    hi,
    just to add,
    In Customizing for the item category at VOV7, you can determine the basis for billing using the indicator <b>Billing relevance</b>.
    This allows you to carry out the following controls:
    A: Relevant for delivery-related billing documents
    Outbound delivery is the basis for billing. The billing document status is only updated in the outbound delivery.
    B: Relevant for order-related billing documents
    The sales document is the basis for billing. The billing status is defined by the required quantity.
    In the standard system the item categories REN (returns) and BVN (cash sales) are set up in this way.
    So depending upon the billing documents configured to the sales document for order and delivery related billing, would be triggered based on the item category setting for billing relevance.
    Pl reward if it helps.
    Thanks
    Sadhu Kishore

  • EJB 3.0 Dependency Injection and reentrant Calls on SFSB

    Hi there
    I have a SFSB (Bean A) that injects another SFSB (Bean B) with the @EJB annotation. Now Bean A does reentrant-calls on Bean B, which is ok, because it just asks for the current state.
    This results in a "javax.ejb.EJBTransactionRolledbackException: Illegal attempt to make a reentrant call to a stateful session bean from home: .....; nested exception is: javax.ejb.ConcurrentAccessException: Illegal attempt to make a reentrant call to a stateful session bean: ....."
    Now I added a weblogic-ejb-jar.xml with the section:
    <stateful-session-descriptor>
      <allow-concurrent-calls>true</allow-concurrent-calls>
    </stateful-session-descriptor>to enable reentrant calls on my SFSB. Unfortunatly this leads to problems with the DI, it simply doesnt work anymore!!! The message now is " java.lang.IllegalStateException: Cannot find object BeanBInterface with java:comp/env/ejb/BeanBInterface". Obviously the DI didn't work, the local variable isn't filled anmyore.
    Is this a bug of WLS 10.0 MP1 or a feature? Should I open a bug report? Any tips a welcome!
    Stephan

    There is currently no possiblity in Weblogic 10 server web layer to use Dependency Injection on any other component than the ones defined in web.xml s.a.:
    - servlets
    - listeners
    - filters
    See here:
    http://e-docs.bea.com/wls/docs100/webapp/annotateservlet.html
    A simple POJO class part of the web application (such as a Backing Bean in JSF or an Action in Struts for example) is not benefiting from DI.
    Doesn't this make Weblogic 10 a NON JEE 5 compliant server?
    Why was this restriction imposed?
    And how is one supposed to use DI with a simple POJO class? Why this huge inconvenience?

  • Using @EJB for injection

    I have tried unsuccessfully to get this working. I am using the Converter example and have adapted it so that the JSP uses a bean to get it's data. The bean calls the ConverterBean EJB to supply this data. If I use the old way of looking up an EJB through JNDI and an initial context it works fine. However, adapting the code to use the JEE 5 annotations I run into problems, I've tried both of the following and neither work:
    // Use default naming
    @EJB
    private ConverterLocal converter;
    // Use explicit naming:
    @EJB (name="Converter")
    private ConverterLocal converter;
    In both situations converter is null when I come to use it. Does the @EJB annotation work from the web tier in Netweaver 7.1? I have also tried using java:comp/env/Converter in the explicit naming method without success.

    Thanks for replying so quickly Diyan. I am not using the annotation from the JSP but from a bean used by the JSP. The specification seems a little ambiguous here as JSF managed beans are allowed to use injection annotations, so I don't see why it would be a problem for POJOs. The JSP servlet generation engine would not need to cope with annotations in this scenario. However, I will try and use the bean from a servlet and see if that works.

  • Difference between com.sap.ejb.annotations.AppStartup and @PostConstruct

    Hi developers,
    In NW 7.3 we have two EJB annotations with identical meaning:
    javax.annotation.PostConstruct
    and
    com.sap.ejb.annotations.AppStartup
    A method annotated like this is invoked by the container right before the EJB is made available to clients.
    Can anyone explain the difference between the two annotations?
    Thanks, regards
    Vincenzo

    Hi
    PostConstruct = EJB standard, AppStartup = SAP proprietary.
    As far as I understand the descriptions, the AppStartup callback invocation occur for all EJBs immediately when the application is starting (no matter if the EJB is called or not) whereas "The PostConstruct callback invocations occur before the first business method invocation on the bean. This is at a point after which any dependency injection has been performed by the container." (see EJB spec).
    So the PostConstruct has nothing to do with application life cycle but with the lifecycle of a single bean instance. PostConstruct may be called later on first client invocation) and in AppStartup, you probably do not have dependency injection performed but have to lookup using java:comp/env.
    Regards
    Rolf

  • Orion-ejb-jar.xml for oc4j and xdoclet

    Does anybody try to use xdoclet to generate orion-ejb-jar.xml with ejb relation?
    Could somebody show me any example of definition relation for xdoclet and orion-ejb-jar.xml? (@orion:persistence...)
    thanks for any advice... :-)
    Zajo

    Hello,
    The warning message looks to be unrelated to the java.lang.IllegalArgumentException error. The warning states that optimistic locking cannot be migrated to the toplink-ejb-jar.xml file; this is stated in chapter 7 of the TopLink developer's guide at
    http://download-west.oracle.com/otn_hosted_doc/toplink/1013/MAIN/_pdf/b13593_v1_01.pdf
    The exception though seems to indicate that your orion-ejb-jar.xml contains EJBs mapped to the same table that are not related through EJB inheritance. I do it all the time with POJOs so this will work in TopLink, but you will need a support case to help get your project migrated if this is the case.
    Best Regards,
    Chris Delahunt

  • Tables related to PM order for actual and commitment items

    Hello Experts,
    I need help in finding the tables related to PM order for actual and commitment items.
    I need develop a report which can show the actual and commitment items for each order and Operation/component under that each ITEM wise and its related documents.
    For the component we can find the table RESB.
    But i am getting the difficult to find the data related to Operation (services)
    In my client we can able to see PM orders with activity types and SKF
    How can build the logic to find the values for each operation item and its commitments (PO, PR) and actual that is FI documents
    Please guide me the   TABLES and fields or else give me the hints, how can find the tables
    Thanks and Regards,
    Narendra

    Hi,
    The tables are COEP (actuals) and COOI (commitments); that is if you mean the financial figures.
    Regards,
    Eli

  • Ho to find script and the related print program for print preview of PO

    Hi All,
    We are getting some text output on the print preview of a purchase order.
    How can we determine the driver script and the corresponding print program for this.
    Can you please guide on this.
    Thanks in advance.
    Regards,
    Sanjeet

    U Can check Driver program and form related to that program table is TNAPPR
    Goto NACE t.code
    Selct Application ---> click on output types
    then u wil get one window there select proper output type and
    double click on  processing  routines u wil get form name and related driver program name also
    Plz try this....
    Edited by: Upender Verma on Feb 9, 2009 1:33 PM
    Edited by: Upender Verma on Feb 9, 2009 1:37 PM

Maybe you are looking for

  • Can't Empty Trash With Large Number of Files

    Running OS X 10.8.3 I have a very large external drive that had a Time Machine backup on the main partition. At some point, I created a second partition, then started doing backups on the new partition. On Wed, I finally got around to doing some "hou

  • Create new page using wwsbr_api.add_folder.

    Hi, When i try and create a new page and assign values to custom parameters using the API mentioned above i receive the following error: ORA-20100: ORA-06512: at "PORTAL.WWSBR_STDERR", line 45 ORA-06512: at "PORTAL.WWPOB_API_PAGE", line 5818 ORA-0140

  • Confuse..p​ls help!!!

    i have my App world before i upgrade my BB to v.5.... now its gone when i tried to download it,it says "Downloads via a USB connection are not enabled for this product. Please visit our mobile download site using the browser on your BlackBerry® smart

  • 1.5.2/1.5.3 Adding Grain to image (bug!)

    Morning all, Found a nasty little bug in the way Aperture creates the image being made ready for editing with the external editor (in this case PS2). A screengrab of the issue can be found at http://danielcuthbert.com/grain.jpg. The image to the left

  • TS4002 I now have 13378 e-mails on my ipad. I want to delete them all but the more I mark and send to trash the number grows!  Help!

    I have just downloaded the new operating system and my emails have grown to 13378.   I want to delete them all, but the more I delete, the more  number multiples. Help!!!