Defining cmp-relation to EB contained in different ejb module project

Hello,
I have to migrate an existing J2EE Application to SAP NetWeaver and WebAS. My task is to keep the structure as similar as possible to increase the recognition factor although using Developer Studio as IDE.
In this application there are cmp relations defined that reference EntityBeans from other sub projects (that I tried to create in different ejb module projects).
References in the same ejb module project seem to work fine but I cannot select referenced EntityBeans of other projects as relation target.
Another remark:
In the given application the ejb-jar.xml-file of the referencing component contains entries of the referenced one. The Developer Studio allows to Add EJBs to ejb-jar.xml, even referenced Beans. But when I select to add referenced EJBs only the Beans of the current project can be chosen. (I did not forget to enter an ejb-local-ref from the referencing to the referenced Bean in ejb-jar.xml as well)
Can anyone give me a hint on how to solve this task? Or where I have forgotten to add a reference?
Thanks
Daniel

Hello Viliana,
Hello everybody else!
I'm currently writing the corresponding masterthesis to my project. That's why I have to deal with this "problem" again.
I tried to look up the part of the spec Viliana's hint ("When you create and use cmp-relationships your beans must be included in one and the same JAR file (that's according to the EJB specification)") bases on.
But the only thing I found addressing this issue tells something else:
"[...]Container-managed relationships can exist only among entity beans within the same local relationship
scope,[...]" (EJBSpec2.1, section 10.3.2)
In my opinion this does not necessarily mean that they have to be in the same JAR but in the same EAR file...
This would mean, that the chosen cmp-relationships strategy with ejb-module-projects is too restrictive.
Can anyone help me with this... Does anyone know further hints on how Entity Beans have to be deployed when belonging to cmp-relationships?
Thanks a lot for any hint on this
Best regards,
Daniel

Similar Messages

  • Managing persistence units across different EJB modules

    Hi,
    I'm testing some things and I have the following situation :
    1 EJB module (.JAR) with basic EJBs and entities
    1 EJB module (.JAR) with EJBs and entities that extend some base entities
    Now, I've placed a persistence.xml in each both defining a persistence unit with the same name (I want both EJB modules, or more specifically the injected EntityManagers therein to know about both the basic as well as the extended entities).
    My question is, what is the correct way to set up a project so you can have some core functionality EJBs and entities, and some optional extension EJBs and entities in such a way that a single persistence unit is used for all entities.
    I hope anyone can help me out here. Thanks.

    Persistence unit will not share references to entity in terms of the inheritance you want to achieve.
    I think the only way you can do that is you the @MappedSuperClass on a class. THis is because the class so annotated is not entered in any of the persistence unit and thus can be shared. I have used it and it works.
    Regards,
    Michael

  • The sales order item & contains a different material

    Hi,
    Converted requisition into purchase order and now getting the following error: "The sales order item & contains a different material"
    Any advice?

    Hello Marianne,
    Your PO seems to be created already, didn't you modify anything in it?
    Did you already check in VA03 your post 380?
    Génia.

  • Security & Servlet engine and ejb container on different servers

              When you have the servlet container and the ejb container on different physical servers,
              how is the rmi connection meant to to be done while still maintaining the seucrity
              propagation from servlet to ejb tier?
              Assume that my user is already authenticated (forms) on the servlet tier. Do we then
              create a dedicated connection (InitialContext + url/username/password properties)
              to the ejb tier and store this connection in the HttpSession? (basically authenticating
              a 2nd time)
              OR,
              can the servlet container make a generic connection to the ejb container, and pass
              the users security context to the ejb tier transparantly?
              -Sam
              

    Nick Minutello <[email protected]> wrote:
              > Assuming that web container security is being employed, I guess the fundamental question
              > is: Is it necessary to create a "connection" (ie. an InitialConext) per user, or
              > can a "global" initial context be shared (in the end, the TCP connection is shared
              > anyway)?
              It doesn't create a 'connection' per user - when you use JNDI authentication (specifying
              principal and credentials when constructing InitialContext) it associates security info
              with the current thread for the duration of the request. If you cache InitialContext and
              use it later on some other thread it will not do anything.
              > Does it really matter?
              No ;-)
              > Thanks,
              > Nick
              > "Dimitri I. Rakitine" <[email protected]> wrote:
              >>Nick Minutello <[email protected]> wrote:
              >>
              >>
              >>> OK, so when I create the InitialContext, I just specify the URL (to call
              >>the remote
              >>> EJB container). The user ID and credentials are mapped automatically.
              >>
              >>> I obviously also need to cache the initialContext variable in my HTTPSession
              >>object?
              >>
              >>> What would happen if I had one InitialContext for the whole servlet engine
              >>- and
              >>> each thread used that. Would the thread (security) context still get passed
              >>- or
              >>> would the credentials for the original connection get used?
              >>
              >>If you use web-app security, container will associate security info with
              >>the current
              >>thread before invoking your servlet. If you do not use it and cache InitialContext,
              >>
              >>then the current user will always be 'guest' (except for the very first
              >>time when
              >>application calls 'new InitialContext()' with username/password.
              >>
              >>
              >>> Thankyou.
              >>> -Sam
              >>
              >>
              >>> "Vinod Mehra" <[email protected]> wrote:
              >>>>
              >>>>"Sam the bad cat" <[email protected]> wrote in message
              >>>>news:[email protected]...
              >>>>>
              >>>>>
              >>>>> When you have the servlet container and the ejb container on different
              >>>>physical servers,
              >>>>> how is the rmi connection meant to to be done while still maintaining
              >>>>the
              >>>>seucrity
              >>>>> propagation from servlet to ejb tier?
              >>>>>
              >>>>> Assume that my user is already authenticated (forms) on the servlet
              >>tier.
              >>>>Do we then
              >>>>> create a dedicated connection (InitialContext + url/username/password
              >>>>properties)
              >>>>> to the ejb tier and store this connection in the HttpSession? (basically
              >>>>authenticating
              >>>>> a 2nd time)
              >>>>>
              >>>>> OR,
              >>>>> can the servlet container make a generic connection to the ejb container,
              >>>>and pass
              >>>>> the users security context to the ejb tier transparantly?
              >>>>
              >>>>If the user has logged in already, ie the authenticated user is already
              >>>>in
              >>>>the execute
              >>>>thread, the identity should be propgated to the ejb tier transparantly,
              >>>>when
              >>>>you create the
              >>>>new initial context.
              >>>>
              >>>>--Vinod.
              >>>>
              >>>>
              >>>>>
              >>>>> -Sam
              >>>>>
              >>>>>
              >>>>
              >>>>
              >>
              >>--
              >>Dimitri
              >>
              Dimitri
              

  • Error "Agreement item contains a different material"

    Hi Expert,
    i hit an error "Agreement item contains a different material" when i use Control key PM02 withAgreement.
    Please advise how to solve this.
    Thanks
    Regards

    Hello
    Please check the Agreement Item .It should be matches with Agreemnet Item when you using The PM02 Control Key Please use the Agreement Item which is used in Agreement which you assigned to the Order.
    Regards,
    Rakesh

  • EJB relation mappings between different ejb jar files.

    I have two local entity EJBs but they are in different ejb jar files. I'd like to make a relationship mapping (one-to-one, one-to-many or whatever) between them. Is it possible? To do that, I need <ejb-name> reference tag each other in both ejb-jar.xml, but how can I refer to ejb-name defined in different ejb jar files? Or as long as you make EJB relationship mappings, all EJBs must be in the same ejb jar file?
    thanks,
    -tom

    Refer to
    http://www.onjava.com/pub/a/onjava/2001/06/26/ejb.html?page=2&x-showcontent=text

  • Single work item view containing all different work item types

    Hello,
    I've been trying to create a view which should contain all different work item types that are assigned to "me" and not closed. I've created a type projection and the view itself and it displays all work items. The problem I've got is that I can't set a critera
    that only shows items that aren't closed as all work item types have their own statuses instead of one common work item status.
    Does anyone any ideas around how to solve this?
    Thanks in advance!
    /Alexander

    Hi,
    I can not justifiy to my clients to purchase an application from 3k to offer something that should be trivial in an application such as service manager. Furthermore, i need sort all my active work items (IR, SR and MA) in accordance with the target date
    calculated by SLO.
    The WorkItem class has a relathionship to the type SLA Information, but type 1 to many. Anyway I could create a view that displays work items and DisplayName field from SLA (basead on first row in the relationship). However I could not display more fields.
    If I  could display TargetEndDate and Status from SLA Information, it would be a reasonable solution for my client.
    Thank´s
    Juan

  • EJB module Editor - Container Transactions bug report

    When in "EJB module Editor" screen under the "Container Transactions" node following bugs happen:
    1) I click on the "Add..." button
    2) In the "Create Container Transaction Entry" screen I click on "Add method.." button.
    3) Once "Define Method Entry" screen appears, I first have to clic on space to see the list of available EJB's (I have 13 of them) as the screen does not display the list! (for this bug the easiest it would be to send you a screen shot so that you can see)
    4) After I selected the EJB I wanted, I choose "*" for all methods
    5) Once returned to the "Create Container Transaction" Screen I click "Ok' and I can see that my Entry was added to the "Container Transaction Entries" list
    6) I go the EJB I just added to the transction entries list, and select the "Methods" node and the frist selected methods will have the appropriate "Container Transaction" attribute set
    7) If I select a different method or simply go back the "Container Transactions" node the EJB in question is not on the "Container Transaction" list any more!!!

    Hi
    I just followed your steps to reproduce the issues reported. I cannot reproduce the refresh issue as you mention in Step 3, but am able to reproduce the issue mentioned in step 7.
    Logged bug 5124894 to track this issue
    Thanks for pointing this out
    Prasanth

  • Unable to load the EJB module. DeploymentContext does not contain any EJB.

    I'm writing an enterprise application to familiarize myself with Glassfish 3.1.2 and EJB 3.1. I've created several local, stateless beans, and injected one into a JSF managed bean. The ejb and web modules compile fine, but when I launch the application with Glassfish I get the following startup error and the application does not deploy. I don't understand what it means, can someone ellaborate?
    SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer prepare method
    SEVERE: Exception while invoking class org.glassfish.javaee.full.deployment.EarDeployer prepare method
    SEVERE: Exception while preparing the app
    SEVERE: Unable to load the EJB module. DeploymentContext does not contain any EJB. Check the archive to ensure correct packaging for D:\Documents\NetBeansProjects\Test\dist\gfdeploy\Test\Test-war_war.
    If you use EJB component annotations to define the EJB, and an ejb or web deployment descriptor is also used, please make sure that the deployment descriptor references a Java EE 5 or higher version schema, and that the metadata-complete attribute is not set to true, so the component annotations can be processed as expected
    org.glassfish.deployment.common.DeploymentException: Unable to load the EJB module. DeploymentContext does not contain any EJB. Check the archive to ensure correct packaging for D:\Documents\NetBeansProjects\Test\dist\gfdeploy\Test\Test-war_war.
    If you use EJB component annotations to define the EJB, and an ejb or web deployment descriptor is also used, please make sure that the deployment descriptor references a Java EE 5 or higher version schema, and that the metadata-complete attribute is not set to true, so the component annotations can be processed as expected
         at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:166)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
         at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
         at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
         at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
         at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
         at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
         at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:722)

    My guess is that you deployed an ejb without bean in it. when you have an ejb module, be sure you have at least one bean present.
    Are you sure you have implementend some beans? Or did you do this only in the web module?
    Try adding an @Stateless bean doing nothing in you ejb module, redeploy and let me know if that works

  • Not able to update single file in a non ejb Module related jar

    Hey all,
    I have depoyed my j2ee application <b>.ear</b> on NW webAS .
           This application apart from having all the ejb Modules related jar, <b>also has a jar which has all my properties files</b> being accessed by my application.
    Very often is it required by me to update these files and restart the application. However i couldnot find a way to update these single files.
    When i select by deployed application.ear and click <b>Single File Update</b> feature provided by SAP in visual Admin, it shown only ejb modulerelated jar. It dosent show my jar containing properties file.
    I have to redeploy my application again everytime i change a small properties file.
    Please let me if there is a way to update these sngle files

    Hi,
    >
    Vikram D Salvi wrote:
    > MOVE-CORRESPONDING ZSTRUC_CM TO I_TAB.                                                                            not working
    >
    > UPDATE ZTEST_CM FROM ZSTRUC_CM.                                                                                not working
    Instead of the move statement you need to use the append work area to internal table statement. you need to have the same structure for the work area and the internal tbale.
    Then use the modify data base table from internal table statement.
    Regards
    Ansari

  • What are the different type of projects

    i mean how many different type of projects are there in sap implementation..
    what do you mean by,
    enhancement project
    rollout project
    development project
    support project
    is there any thing else other than this?
    please clear my doubt.
    points would be rewarded.
    thank you.

    Check the link:
    http://help.sap.com/saphelp_sm40/helpdata/en/ba/38c93a37c59122e10000000a114084/content.htm
    Implementation Project
    Project to implement business processes in an SAP landscape.
    Create a project structure from the business processes. You can either create a new project structure, or base it on one of the following:
    One or more user or partner templates
    An existing project
    Scenarios and configuration structures delivered by SAP 
    An existing production solution landscape
    Template Project
    A project to create a template.
    A template makes your project structure, or parts of it, with its assigned objects (documentation, test cases, IMG activities), available to other projects.
    You can lock templates, completely or partially, against changes when they are used in other projects. To use templates in other systems, transport them.
    Template projects are especially suited to SAP partner solutions or global rollout.
    Upgrade Project
    A project to upgrade existing systems.
    In an upgrade project you can:
    Upgrade customizing: Upgrade existing functions
    and/or
    Delta customizing: Copy additional functions
    Optimization project
    A project to optimize the flow of business processes, or the use of a software solution.
    You can use optimization projects, for example, in SAP Services.
    Safeguarding project
    A project to resolve a critical situation in the implementation or use of an SAP solution.
    Safeguarding projects show the reasons for a critical situation and coordinate the steps required to resolve the problems.
    Maintenance project
    A project to maintain a solution
    in Change Request Management. The project contains all maintenance activities and urgent corrections of a solution.
    in Check-In/Check-Out Business Processes from the Solution Directory
    Regards
    Edited by: Sravan Prakash.V on Dec 28, 2007 12:25 PM

  • How to hide different Viual Studio Projects from each other in one TFS Team Project with areas?

    Hi,
    at the moment I try to set up a "good" architecture for projects in TFS for our company.
    As often mentioned in TFS documentation we try to reduce the number of Team projects in our company which is organized in different business units (BUs).
    One great Team project shall contain a number of different Visual Studio projects, each one belonging to a separate BU.
    The grouping is as follows:
    Global Team project
           Business Unit A
                         Visual Studio Project A1
                         Visual Studio Project A2
           Business Unit B
                         Visual Studio Project B1
                         Visual Studio Project B2
    The programmers in business unit A must not see the Visual Studio projects of Business Unit B, but both groups (A an B) use the same process model (that is the reason why we try to group them in on team project).
    I try to put all the projects from both BUs in one TFS team project and separate them logically by an Area hierarchy like mentioned above.
    But areas only separate work items from each other, not Visual Studio projects.
    In Source Control Explorer I can only assign security issues on team project level (Global Team Project), not on business unit level.
    So every developer in BU A can see the Visual Studio projects in BU B...
    How can I model these dependencies?
    Regards and thanks
    Lothar

    Hi Lothar, 
    Thanks for your post.
    What’s the version of your TFS and VS?
    In Source Control Explorer, you can right-click on Business Unit A folder and select
    Advanced>>Security… to deny other group(s)’ access permissions on this folder. Then use the same way to set permissions on Business Unit B folder too.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can connect different ejb server in one client program

    hi , every
    i want to make connect ejb server into one client program.
    for that , but i try to change PROVIDER_URL property , it's not correct
    who solve this problem for novice? :(

    You need to create separate initialContext to each of the different servers
    and lookup up the different ejbs.
    -Sabha
    "inking" <[email protected]> wrote in message
    news:[email protected]..
    hi , every
    i want to make connect ejb server into one client program.
    for that , but i try to change PROVIDER_URL property , it's not correct
    who solve this problem for novice? :(

  • In a single program how to lookup different EJB from different application

    Hi,
    I have deployed two applications app1 and app2 on oc4j.
    There is a stateless session bean in a1 called ejb1.
    And there is also a stateless session bean ejb2 in app2.
    I write a test jsp in app1 to lookup ejb1 and ejb2 as an application client. So I need to create an application-client.xml for it.
    <?xml version="1.0"?>
    <!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN" "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
    <application-client>
    <display-name>ejbs</display-name>
    <ejb-ref>
    <ejb-ref-name>ejb1</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>class_of_ejb1Home</home>
    <remote>class_of_ejb1</remote>
    </ejb-ref>
    <ejb-ref>
    <ejb-ref-name>ejb2</ejb-ref-name>
    <ejb-ref-type>ejb2</ejb-ref-type>
    <home>class_of_ejb2Home</home>
    <remote>class_of_ejb2</remote>
    </ejb-ref>
    </application-client>
    However, When I run the test.jsp, It will report following error:
    javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'class_of_ejb2' found for the ejb-ref ejb2
    In fact, if I only lookup any of the ejb and the application-client.xml just specify only the according ejb-ref, everything is alright.
    But how to construct the application-client.xml so that it can suitable for 2 different ejb in different application? Do I miss something in doing it?
    Kindly advice!
    Queeny Tang

    Hi Debabrata Panda,
    I did add parent in web.xml, but it still encounter
    "Error reading application-client descriptor: No location specified and no suitable instance of the type 'class_of_ejb2' found for the ejb-ref ejb2"
    In my program, a jsp in app2 will lookup ejb1 of app1. In the same way, a jsp in app1 will lookup ejb2 of app2.
    if I declare in server.xml
    <application name="app2" path="../applications/app2.ear" parent="app1" auto-start="true" />
    <application name="app1" path="../applications/app1.ear" parent="app2" auto-start="true" />
    That will cause error reading application-client.xml for all
    ejbs.
    How to solve this.
    Thanks in advance!
    Yours Queeny

  • Error: The folder does not contain a valid Flex Builder Project.

    HI All,
    My first Post here. I am new to Flex Hardly 10 days old. I
    want to open the flexstore project in flex builder 3 and could not
    able to do so.
    What I did: file->import->.... got the error msg as
    "The folder does not contain a valid Flex Builder Project".
    also tried file->import->general->..... same error
    msg.
    I need your Help guys
    I downloaded the sample project from
    http://examples.adobe.com/flex2/inproduct/sdk/flexstore/srcview/index.html
    Thanks in Advance
    SAS
    Text

    "shakeb66" <[email protected]> wrote in
    message
    news:gknbn8$av9$[email protected]..
    > HI All,
    > My first Post here. I am new to Flex Hardly 10 days old.
    I want to open
    > the
    > flexstore project in flex builder 3 and could not able
    to do so.
    > What I did: file->import->.... got the error msg
    as "The folder does not
    > contain a valid Flex Builder Project".
    > also tried file->import->general->..... same
    error msg.
    > I need your Help guys
    > I downloaded the sample project from
    >
    >
    http://examples.adobe.com/flex2/inproduct/sdk/flexstore/srcview/index.html
    Try creating a new Flex project and dragging the files from
    the zip into the
    src folder. You may find that you need to rearrange things a
    bit, depending
    on how they set up the project, but this should get you
    started.
    HTH;
    Amy

Maybe you are looking for

  • Sound blaster Z with no sound from Optical S/PDIF output

    Hi, I'm trying to record music from a Denon DTR-2000 Digital Audio Tape deck. I have connected a optical S/PDIF cable from Optical Out on the DAT player to the Optical In on the sound card but I'm not hearing any sound. I've also tried with a CD/DVD

  • Client Security Solution password problem

    I have just had my computer reformatted to the factory settings. I wanted to avoid having to enter my password each time I logged in but, as has happened before, I forgot what the process was. Eventually I made my password blank and did something els

  • HT201209 trying to buy my music wish list?

    Picked my music wish list and now want put in my music library and use my gift card? Money has been registered can you advise how to pay for the music?

  • Web Auth not working

    I have spent a lot of time troubleshooting this and think I've narrowed down the problem. Here is the setup: I've got two 4402 controllers running 4.0.179.11. The guest SSID is mapped to a dynamic interface (VLAN). The VLAN is trunked through one swi

  • Oracle E-Bussiness Suit (11.5.9) and Linux RHEL AS4

    Hello, somebody help me to find documents about Oracle E-Bussiness Suit (11.5.9) and Linux RHEL AS4. How it comunicate? I just need a simple scheme how it is work. Pleas! Urgent! Message was edited by: user527625