EJB Design Query

We have App A and App B which both need to access some common business objects. These business objects contain logic required to perform a specific function. Currently these are POJO's, and the access to them is done remotely by the applications via Stateless Session Beans. Currently we have 1 SSB per application. Some of these SSB's make the same method invocations on the business objects. It was a design assumption that when application logic was required it would be placed in the application specific SSB. Is this correct?, or should the SSB be generic ? containing generic methods to access the business objects? If there should be generic methods, how do we cater for the situation in which App B required different functionality to App B?

To try and make my query more specific, lets look at 2
scenarios.
Well you said you had POJOs. If you are converting to EJBs then the code should probably be the same unless you intend to run different servers.
Scenario 1:
Lets assume that both apps call seperate EJB's with
the same method signature but the implementation
differs. Are you saying that this is OK, but not OK if
we provide special cases within a shared/common EJB
for the two applications?.
For an EJB you would add a different signature. For POJOs then there is nothing at all shared so the point should not even come up.
Scenario 2:
Assume that the two seperate EJB's have the same
method signatures and have the same implementation,
which is to simply call methods in the common java
business objects. In this case should the EBJ's be a
common/shared EJB, even if we do not know if in the
future they will differ (as in scenarion 1)?.For an EJB then you should be using the same server and thus the same EJB.
For POJO if there is only one shared method in all of the code then I would keep them seperate. If you have hundreds then you need to start considering whether a common code base is needed (given the points I listed before.)

Similar Messages

  • Specific EJB-QL query for m:n relationship

    Hi all,
    could anyone help me to write EJB-QL query? I'm designing an application and not sure how to express the following query in EJB-QL notation:
    For demo study imagine the following schema (from Sun J2ee tutorial):
    Player ------- Team
    with m:n relationship
    Players: John, Mike, Tom. Jim
    Teams: RedHeads, WhiteKnees, BigPlayers
    I want to write a query that finds all players that are NOT in e.g. RedHeads team (they can be members of other teams).
    Thanks,
    Tomas

    Can't help you on presenting an all cooked up query, but I suggest solving this kind of problem with a SessionBean containing the logic to filter players in the e.g. RedHeads team.
    Using a finder method is very costly, the general advise I hear is using EJBQL only when you really need to and only 'findByName' or 'findAll' style. If you know what I mean.

  • Where can I get the material about EJB Design?

    I am working with EJB for a short time.I know that a
    well-designed architecture is very important.So I want to learn more about the EJB Design.Can anyone tell me where to find such material?And which book shall I choose?
    Thank you.

    if you are doing some browse-server design using ejb, I think you can read the sun's blueprint of j2ee, and study the sample application - pet store.
    best regards.

  • How can I develop a web application using EJB design pattern?

    I have searched over the web and found quite a lot of tutorials on how to use the EJB design pattern.
    I know that there will be a home interface, EJB object interface and a SessionBean.
    But the tutorials often only cover a single class, this made me unable to get a complete picture of how EJB design pattern can be implemented into a whole system.
    I am now required to devleop an online shopping web application using EJB and JSP page.
    I think I will need to create a lot of classes: Member, ShoppingCart, Product...etc.
    What I want to ask is that, do I need to create a home interface, EJB object interface and a SessionBean for each of these classes?
    I really need some ideas on how to develop this system using EJB + JSP pages.
    Many thanks to you all.

    For every EJB that you want to create, you will need to code a home and remote interface and a bean class.
    You could start getting your ideas here
    http://www.theserverside.com/books/wiley/masteringEJB/
    http://www.coreservlets.com

  • How to write EJB-QL query with IN notation and list values EJB3.0?

    hi,
    I would like to write an EJB-QL query where the query would return the objects whose name equals to one of the names in the list.
    SELECT DISTINCT OBJECT(feature) FROM MAPSHEET_LOCK feature WHERE feature.name IN ?1
    For ?1 I would like to pass in a list. How can I write this query?
    Thanks

    List<String> names;
    StringBuilder sb = new StringBuilder("SELECT DISTINCT OBJECT(feature) FROM MAPSHEET_LOCK feature WHERE feature.name IN (");
    String separator = "";
    for (String name : names) {
      sb.append(separator);
       sb.append("'");
       sb.append(name);
       sb.append("'");
       separator = ", ";
    sb.append(")");
    String ejbql = sb.toString();
    // Code for execute query
    ....Message was edited by:
    Rulas

  • I am designing query based on dso

    Hi,
             i am designing query based on dso. in my query  production orders have multiple operations.when i execute my query report is showing only latest operations.we need to all operation.how can i fetch.
    ex :   production order                  operation
               100000141                            10,20,30,40,50
    when i exceute the query query is showing only  100000141 & 50.query is not showing 10,20,30,40 opeartions.please help me.
    Thanks & Regards,
    chandu.

    Hi Chandu,
    Check for the filters and variables for production order operation
    in query designer.
    Also check if that field is restriced to particular values, and check for any periodic restrictions.
    Hope this helps...........
    Rgs,
    I.R.K

  • Embedding a report designer query into a template - errors out

    In a template i want to include the report designer query, with the web item type - report, when i drag the report item into the template and try to edit it, it takes me to the report designer, there I'm able to open my report designer query - then when i go to - menu - transfer to web apllication designer - it takes me back to WAD but errors out saying it encountered a problem. Did anyone come across this issue? And how did you overcoem this? Any help or pointer would be appreciated and rewarded.
    Please find the error log below:
    3:45:25 PM.686 ########## END  ##########
    3:45:25 PM.686 ########## --> com.sap.bi.et.wad.BexWebApplicationDesigner.Launch.Main ##########
    3:45:25 PM.686: For Info: WAD Start. Revision: 7005.5.1100.277
    GetSystemInformation
    SUNI Const: 1.602272
    CommunicationFactory.GetSystemInformation (Setting Conn 1)): 1.602272
    CommunicationFactory.GetSystemInformation (Setting Conn 2)): 7.110082
    CommunicationFactory.GetSystemInformation (Setting init Propties)): 7.110082
    CommunicationFactory.GetSystemInformation (SUNI.FUNCTION_EXISTS)): 7.710934
    RSR_XLS_RFCtrc: 8.51207
    CommunicationFactory.GetSystemInformation (RSR_XLS_NET_INTERFACE)): 18.02556
    CommunicationFactory.GetSystemInformation (XML Stuff)): 20.0284
    CommunicationFactory.GetSystemInformation (Prop Stuff)): 20.0284
    CommunicationFactory.GetSystemInformation (Version)): 20.0284
    CommunicationFactory.ObtainSystemInformationandCheckVersion (GetSysInfo)): 20.128542
    BExTextPool.New1: 0.300426
    BExTextPool.New2: 0.400568
    BExTextPool.New3: 0.400568
    BExTextPool.New2: 0.400568
    CommunicationFactory.ObtainSystemInformationandCheckVersion (CheckAfterLogin)): 1.00142
    CommunicationFactory.LogOnUsingComConnection (ObtainSystemInfo)): 21.129962
    CommunicationFactory.LogOnUsingComConnection (MainConnectionChangedEvent)): 0
    CommunicationFactory.LogOn: 21.730814
    3:45:41 PM.458: Connected. System: BID
    <?xml version="1.0" encoding="utf-16"?>
    <I_T_SEARCH_ATTR xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
    <?xml version="1.0" encoding="utf-16"?>
    <I_T_SEARCH_ATTR xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
    RSR_XLS_RFCtrc: 0.700994
    BExThemes.LoadFromBackend: 2.50355
    BExThemes.LoadFromBackend: 0
    BExThemes.LoadFromBackend: 0
    Vert
    BExThemes.LoadFromBackend: 0
    <?xml version="1.0" encoding="utf-16"?>
    <I_T_SEARCH_ATTR xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
    BExThemes.LoadFromBackend: 0
    Vert
    BExThemes.LoadFromBackend: 0
    3:47:41 PM.198 ########## END com.sap.bi.et.wad.BexWebApplicationDesigner.Launch.Main ##########
    3:47:41 PM.198 ########## --> com.sap.bi.et.wad.RDHost.WADRDHostFactory.MaintainItem ##########
    -EXCEPTION-START- 3:47:41 PM.198: External exception in Report Designer (execution) ---
    Exception Message: Specified cast is not valid.
    Exception    at com.sap.bi.et.ReportDesigner.RDbReportDesigner.getCookies()
       at com.sap.bi.et.ReportDesigner.RDbReportDesigner.RunFromWAD()
       at com.sap.bi.et.wad.RDHost.WADRDHostFactory.MaintainItem(XmlElement iItemTagNode, XmlElement iLibItemTagNode, IWADHostServicesProvider iServicesProvider, Boolean iIsLibItem)
    Full Stack:
         at com.sap.bi.et.wad.Debug.WriteTraceToFile(Level, String, Exception)
         at com.sap.bi.et.wad.Trace.Exception(Exception, String)
         at com.sap.bi.et.wad.RDHost.WADRDHostFactory.MaintainItem(XmlElement, XmlElement, IWADHostServicesProvider, Boolean)
         at com.sap.bi.et.wad.rdcontrolhost.WADHostFactory.MaintainItem(XmlElement, XmlElement, IWADHostServicesProvider, Boolean)
         at com.sap.bi.et.wad.wiz.WADsF4GUIServices.CallCustomItemDialog(XmlElement, Form)
         at com.sap.bi.et.wad.man.WADfrmMainWindow.mnuCTXTEditTagCustom_Click(Object, EventArgs)
         at System.Windows.Forms.MenuItem.OnClick(EventArgs)
         at System.Windows.Forms.MenuItemData.Execute()
         at System.Windows.Forms.Command.Invoke()
         at System.Windows.Forms.Control.WmCommand(Message&)
         at System.Windows.Forms.Control.WndProc(Message&)
         at System.Windows.Forms.ScrollableControl.WndProc(Message&)
         at System.Windows.Forms.ContainerControl.WndProc(Message&)
         at System.Windows.Forms.Form.WndProc(Message&)
         at System.Windows.Forms.ControlNativeWindow.OnMessage(Message&)
         at System.Windows.Forms.ControlNativeWindow.WndProc(Message&)
         at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
         at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&)
         at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32)
         at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32, ApplicationContext)
         at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32, ApplicationContext)
         at System.Windows.Forms.Application.Run(Form)
         at com.sap.bi.et.wad.BexWebApplicationDesigner.Launch.Main()
    -EXCEPTION-END----

    Hi Voodi,
    I have the same problem too. Worked  fine in SP 9 . Now we are in SP11 with FEP also in SP11 revision 277.Did you resolve the issue if so how?
    Thanks,
    Karthik

  • EJB finder query with ORDER BY clause

    Hi,
    How to query the data in ordered list using Order By clause in the entity Bean.
    Here is the part of My code in which i am interrested.
    /* @ejbgen:finder
    * signature = "Collection findAllData()"
    * ejb-ql = "SELECT OBJECT(z) FROM DataProfileBean AS z"
    abstract public class DataProfileBean extends EntityAdapter {
    * @ejbgen:cmp-field column = DATA_PREFIX
    * @ejbgen:primkey-field
    * @ejbgen:local-method transaction-attribute = Required
    public abstract Integer getDataPrefix();
    public abstract void setDataPrefix(Integer DataPrefix);
    Now what modification needs to be done in the ejb-ql query to find the DataPrefix in the sorted list.
    Regards,
    Dilip

    I don't think the current spec for EJBs support ORDER BY. But Weblogic has an extension that you can use (that is, if you're using it). Here's the info: http://e-docs.bea.com/wls/docs61/ejb/cmp.html#1076421

  • Big Troubles on designing Query about special customers' counting

    Hello buddies:
    I meet a problem on designing Query about special customers' counting. Let me describe the requirment first.  I want to create a query with BEX , and there is a key figure with very special logic.
    That is: to list the counts of the customers which has more than one sales records in a time period from sales data. 
    For example :
    when the user excute the query , he or she must input a time period ( 2007.01~2007.03 e.g)
    then the query output as follow:
    District          Cust-sount
    North-Zone       100
    South-Zone      120
    The Main trouble are :
    1. Threr are no document number in the detail of sales data document records. so I could not count the sales times with document number.
    2. The time period is not fixed value, it depends on the user's input, so I can not define the counting logic in the update rule or in the query with fixed time period.
    Anybody who met similar requirement pls show me your hand and give your solutions, thanks very much.
    Jason

    Hi,
        Your solution sounds a good way to count the distinct customers. but in my case, one salse line item must not be recognize as one sales record, instead,  one customer's all sales line items occurs in one day must be  recognize as one sales record ( or we say that one sales behavior).
    for example:
    customer     product    quantity   date
    cust001       prod001        10       2007.06.06
    cust001       prod002        20       2007.06.06
    the two line items above means one sales record for the customer "cust001".
    so I could not simply use the CKF : (( Counter ) *FV2 ) > 1 .
    Best Regards,
    Jason

  • Query Designer - Query:Specialist Group Status

    Hi Gurus,
    One of my BI user is getting error in this:
    In Query Designer - Query:Specialist Group Status
    "Registered JIT debugger is not avialable. An attempt to launch a JIT debugger with the following
    command resulted in an error code of 0x2(2). please check computer settings.
    cordbg.exe !a 0x289c"
    but when I tried with SUPER USER access i am not getting above error.
    Guys please suggest me asap
    Thanks
    sahad

    hello,
    Check the variabledefinitions of the query.
    Try RSRT and 'execute and debug'.
    It might be you get a lot more detailed information about the problem.
    see OSS note 961995.
    Regards,
    Dhanya

  • Where to put EJB design patterns?

    Im considering where to put the EJB design pattern classes and files.
    i.e. Facade, Data Access Objects, Transfer Objects, Delegate...
    I was thinking since the EJB business logics and implementation should be hidden from the user, then it is more logical to place these classes at the webapp.war inside of the ejb.jar.
    What are your thoughts guys?

    Photoshop patterns and normally stored in sets the set files have an extension of .pat.  You may also add individual patterns using menu Edit>Define Pattern.  In some Photoshop Pattern dialog you will see a little gear icon to open a Fly-Out menu in that menu there is a entry for Photoshop Preset Manager.  The are also other ways to get into the Preset manager.   In the preset manager you can manage many types of presets. Using its pull-down menu select patterns.  You can Load an save patterns sets.  To save a set tou heed to hilifht the paterns yoy want to include in the set.  You can also delete and rename patterns.

  • Report designer Query Transport issue!

    Hello ALL,
    Iu2019ve created a formatted report in Report designer the basis of which is a query developed in Query designer. Now the issue is Iu2019ve captured the query developed in Query designer by going to RSA1Transport connectionQuery Elements, but Iu2019m unable to capture the report designer query i.e when I try to search with this RD query name it says query does not exit.
    Can someone please help, how I can transport this Query developed by Query designer.
    Regards
    Madhavi

    Hi,
    let me know the solution?
    as i know , need to save and activate? and refresh in RSA1. you can find out your object.
    regards.
    Ram

  • EJB Design Patterns

    I picked up "EJB Design Patterns" by Floyd Marinescu. As I started reading through the book I began to wonder if these were standard patterns. So my question is this. Are the patterns described in this book accepted standards for design EJB's?
    Thanks

    Hi,
    You can check out the Core J2EE patterns at
    http://java.sun.com/blueprints/corej2eepatterns/index.html
    and also some examples and other strategies as applied in an application at
    http://java.sun.com/blueprints/patterns/catalog.html
    The Core patterns would be considered as the standard patterns and would probably help quite a bit.
    hope that helps,
    Sean

  • EJB Design Patterns Book Question

    I have been recently reading the EJB Design Patterns book by Floyd Marinesu.
    In one of the earlier chapters he says that 'entity beans are transactional creatures, each method call on an entity will require a separate transaction ..'.
    Surely this is wrong, if you are using CMT and mark your method transaction attribute as Required then if the calling bean has a transaction the called bean will use that transaction, rather then requiring a separate transaction.
    Someone please explain.

    Quoted out of context, the statement seems to be incorrect in some cases. IMO, the fact stressed is the "synchronization of the remote entity", which might have been loosely associated with a separate transaction.
    Here's the original quote.
    Furthermore, since entity beans are transactional creatures, each method call on an entity will require a separate transaction on the server side, requiring synchronization of the remote entity with its underlying data store and maintenance on behalf of the application server.
    Maybe Marinescu would answer that better :-)

  • No Dashboard Design Query on OLAP Universe BO 4.0

    Hi all,
    the goal would be to create a Dashboard Design Query on a OLAP MSS Analysis Services Universe (UNX).
    These are steps we follow to create the Universe (UNX) with IDT on BO 4.0.
    1.) Create the Project
    2.) Create the OLAP connection on OLAP Cube of MSS Analysis Services
    3.) Publish the OLAP connection
    4.) Create a Business Layer on OLAP Connection
    5.) Publish the Business Layer into the Repository
    Using that universe ( UNX ) with Infoview we have no problem to create a WeBi document.
    Using Dashboard Design Version 6.0.0.0 Build: 14,0,2,594 to create a query using that Universe ( OLAP UNX ), the system doesn't list that Universe. It seems that it doesn't exist!!!
    Someone has solved this issue?
    Thanks in advance.
    Luca Fatigati.

    Hi Nikhil,
    I have the same setup as mentioned by Luca Fatigati in previous post.
    Trying to create  Dashboard Design Query on a OLAP MSS Analysis Services Universe (UNX). But I am not able to .
    Also I tried creating Explore on top of my UNX whcih is created on MSS Analysis Services Cube , ( OLAP UNX) , I am not able to see my UNX in Explore also .
    Can you please let me know if this is not supported here as well . ?

Maybe you are looking for

  • Can multiple devices share the same library?

    I was under the impression they could not. I had originally had iTunes installed with my 5th generation iPod. Several months back my wife got an iPhone 4. We were under the impression we had to set up a library exclusive to her device, so we did. I h

  • Adding a Second Project Site with same restore data

    This is the first time I've had to accomplish this  I have a dev server where I restore a backup from 2 weeks ago to http://devserver/pwa My team has asked for a restore from 2 weeks + 1 day to http://devserver:99/pwa - I've tried deleting site colle

  • Which tables are to be used to select all counters readings in SAP CRM 7.0?

    Hello, I need to create a request by SQ01 to extract all counter readings in the database. First I've found the table CRMD_MPK_READING but this one does not give the value of the counter. It only contains the GUID of the counters, some information ab

  • Apple TV 2 Setup

    Hi! Just a quick question to see if this set up will work... I have a Sharp XGF260X which only supports DVI and I am wanting to get an Apple TV 2 so I can mirror my iPad 2 onto the screen... The set up is: AppleTV 2 connected to projector using HDMI

  • Digital minijack to coax on z5500s getting no d

    Im connecting my audigy 2 zs to my z5500 using a stereo minijack to mono phono plug converter to connect coax to my z5500. All i get is no digital data no matter what settings i've tried. Is there a specific way to set up to use the digital out or am