Database-aware business objects / listeners

I'm trying to write an EntityListener to apply a numeric edit stamp whenever a business object is inserted or updated. This is pretty trivial in most cases, but I have multiple databases running in the same application (one database per client). I need the edit number to be specific to a client.
Currently my EntityListener methods look something like this:
     @PreUpdate
     void preUpdate(final Auditable auditable) {
          long editNumber = EditNumberGenerator.sharedInstance().nextEditNumber();
          auditable.setEditNumber(editNumber);
          auditable.setModified(new Date());
However, this uses a global EditNumberGenerator. I need this to be district-specific. What I really need is something like this:
     @PreUpdate
     void preUpdate(final Auditable auditable) {
          String databaseName = getEntityManagerParam("databaseName");
          final long editNumber = EditNumberGenerator.getInstance(databaseName).nextEditNumber();
          auditable.setEditNumber(editNumber);
          auditable.setModified(new Date());
     private String getEnityManagerParam(String key) { ... }
I'm not sure I'm explaining this well, but is there some way for my EntityListener (or the business objects themselves) to know what database their EntityManager is pointing to?

If you use a TopLink specific DescriptorEventListener instead of the JPA EventListener you will get a handle on the TopLink session being used and could then query the database or access a database name from the session.
Depending on the edition/version of TopLink you are using you should find information related to this event listener in:
- TopLink Essentials JPA Extensions
- Oracle TopLink 11gR1 (tech preview 3) JPA Extensions
- EclipseLink JPA Extensions
If you need more specifics let me know which TopLink you are using.
Doug

Similar Messages

  • Monitoring changes in Oracle Database with Business Objects

    Hi: I need to know if there is a Business Objects tool that allows me to be constantly checking one Oracle database to see if there are changes. The customer is not permitted to access the database, only has enabled a stored procedure that returns a string value if there are changes or not. That string (XML) is performed by DataServices later with BO to generate something. I would like to know if there is any product of BO (Data Integrator, etc ...) that allows me to take an active process of consultation on the Stored Procedure and that the consultation is launched every 10-15 seconds.
    Thanks in advance
    Santi

    Yes I am using Generic ODBC connection and it goes fine till the authentication even it is showing me schema tables, but when I try to fetch any table columns or try to view table values it goes stuck or give me error.
    Can you please guide me in detail how I can turn off advance features and what values should I put in Array Size, etc.
    Regards,
    Danish Baig.

  • How to Access SSM PAS model database in Business Objects

    Dear Gurus,
    My core user would like to see few reports from SSM into Business objects.
    How can I create a universe from SSM DB , connection type ?.
    Please suggest.
    Regards
    Arif

    HI Qureshi,
    In order to create a Universe on top of Strategy Management Data (Scorecards or PAS models), you need to be on 7.5 SP2 minimum. Anyway, I strongly advise to always have the latest SP (currently SP5 HF1) installed.
    For detailed information on this topic, you should go through the [Strategy Management Configuration Help for Servers|https://websmp206.sap-ag.de/instguidescpm-stm] that you can find in the Service Marketplace.
    This guide provides details on:
    Providing Strategy Management Data for Xcelsius Dashboards (through Web Services)
    Providing Strategy Management Data for Voyager (through the creation of a Universe)
    Hope this helps!
    Best regards,
    Ricardo Vieira

  • Database connectivity to business objects

    Post Author: kshatri
    CA Forum: Administration
    Hi All,
    I am new to for my first project, having good knowledge about BO but my only concern is with the first day target.
    As a new team mate memeber what are my roles and responsibilites to be done.
    How to interact with the Administrator to get my database connectivity and then how to implement the path provided by the admin people to get my database activate and then to connect it to the business objects.
    So again i am requesting you all if you any one among you, who has already gone through this situation  could help and make to understand how to connect the database to business objects.
    And how to present ourslef in a new environment.
    Thanks,
    Anu.

    Post Author: jsanzone
    CA Forum: Administration
    Anu,
    This is one of those forum threads that could last all year with comments, tips, and criticisms.  If you have a lot of knowledge about BusObjects, then you are nearly half way there.  In my experience, the biggest road block to success is communication and team cohesiveness.  If everyone on the project are not communicating with each other then everything is going to fail.  What do I mean about communication?  It's hard to pin down, but when I see it I'll know it's there (smile).  For starters it's having a good plan that everyone can work from.  An underlying theme in communications is also trust.  The folks who hand out the userids and passwords must be able to trust the folks who are receiving the privileges.  If the administrator must give you read/write access to his or her database and they don't "know" you, then this is an uphill battle.  Many administrators do not understand middleware such as BusObjects, they are more familiar with things like Access, and such -- the more simpler applications.  When you try throwing terms around like business intelligence, single-sign on, multiple queries, data providers, meta data, report viewer, etc, etc their heads start to spin and they want you OUT of their sight.  All of these concepts must be introduced gently and in an appropriate setting.  The admins must get familiar and comfortable with your tools before you can make headway.  So that is what I mean by communication, in this case laterally.  You must also communicate upwards (the C-level folks), and downward, the users.  Like I said, folks could add to this thread infinitum, and I would invite other as such, but here are some things to think about as you move forward.  The best teacher is experience, but who has time for that?

  • Reg:-10901: Database error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.. Contact your Business Objects administrator or database supplier for more information. (Error: WIS 10901)

    Hi Friends,
    When i schedule the report in infoview ,i am getting this error, could you please let me know how to solve this error.
    10901: Database error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.. Contact your Business Objects administrator or database supplier for more information. (Error: WIS 10901)
    Thanks
    sreedhar

    Hi,
    I am able to refresh the report in Infoview and data is dispalying , but when i schedule the report in infoview i am getting that error.
    I am not clear on below one could you please elaborate on this
    You need to create ODBC for SQL server.Check your BO server is able to connect SQL Server.
    Thanks
    sreedhar

  • CAF Business Objects in Separate Database

    We currently have an application written in CAF which is using Business Objects/Entity Services using local persistence. I believe the local persistence automatically uses the default datasource defined in the SAP WAS portal server and creates the tables in that database.
    The requirement is to have that CAF application data stored in a different database instead of the portal database. There are ways to install a separate datasource in the SAP WAS server to point to a different database, but I don't know how to make CAF Business Objects use that newly installed datasource, or whether it is possible?
    Any help is appreciated!

    Hi,
    it seems I've to achieve that by using associations.
    But how should the Scenario look for my example?
    The relation is the following:
    Each application has exactly one division.
    Is it correct like that?
    DIVISION: Association to APPLICATION ("DivisionApplication"), CROSS_BO, ONE_TO_MANY
    BO APPLICATION: Association to DIVISION ("ApplicationDivision"), CROSS_BO, NONE_TO_ONE
    Another question:
    I can now add an association to APPLICATION  through the service browser by choosing the association name "ApplicationDivision" and putting the 32 digit the DIVISION that I want to associate.
    Is that the only way to do it in service browser?
    As this is impossible for business users, do I have to create a WD for them to maintain those values in an easier way?
    Thanks.

  • BI Publisher & Business Objects Universes Database

    Does anyone know if it is possible for BI Publisher to hook into Business Objects Universes data? JDBC drivers?
    We would like to import all our Crystal Reports into BI Publisher but a lot of them are written across the "Business Objects" BI database.

    There is information to converting Crystal Reports to BIP Publishers
    http://www.oracle.com/technology/products/xml-publisher/index.html
    http://download.oracle.com/otndocs/xmlp/CrystaltoBIP.pdf
    Maybe it could interest you
    Regards
    Christophe

  • Purpose of a database server for Business Objects XI 3.1

    Hello Team,
    I am quite new Business Objects and right now I am using Business Objects Enterprise XI 3.1.
    when installing BO XI 3.1, I was prompted to select the database server to be created. I chose MySQL.
    Now, I am curious to know the pupose/involvement of a database server for BO. I understand that the database is being managed/used by CMS and it has four main functions:
    Maintains security (users)
    Manages objects (folders, reports, and program objects)
    Manages servers (services)
    Manages auditing (system auditor).
    Is there any better explanation to the database and its purpose?
    what does the database schema/user holds (any database objects,tables,etc..,)?
    Does repository and database schema the same?
    Are all the report objects, users and universe being stored in the database schema?
    Thanks in advance for the reply.
    Regards,
    Kathir

    the database server for BO XI 3.1 is needed to store the repository for the system which in another meaning the structure of the system itself.
    yes the repository is the same as the schema, but schema is a database concept.
    all the objects (universes, reports,,,,,,, etc) are stored in the FileStore of Business Obejcts system, but the structure of how those object are stored is exist into the repository database.
    good luck
    Amr

  • Business Objects Planning Database Upgrade

    I have attempting to upgrade Business Objects Planning from version 11.2 to 11.6.  The upgrade appears to run successfully, however, when I attempt to start the Planning Application Services, the service fails to start up, stating the current DB version is less than the working version.  I have spoken to our consultant, who stated he knew nothing of any changes that must be made to the database.  The first portion of the error log is copied below.  I have tried an incremental step of upgrading from 11.2 to 11.5 and have received the same error.  What must I do to configure the database either before or after the upgrade? 
    Application is set up as single server.
    OS is windows server 2003
    Database is Oracle 10.2.0.4.
    Database user is SRCAdmin, and is an owner of the db.
    FATAL|04/08/2009 13:52|General|Server startup...
    INFO|04/08/2009 13:52|Sql|Current DB Version 11.2 is less than the working version 11.6. Requesting upgrade lock
    ERROR|04/08/2009 13:52|Sql|ORA-06550: line 1, column 77:
    PLS-00201: identifier 'DBMS_LOCK' must be declared
    ORA-06550: line 1, column 77:
    PL/SQL: Statement ignored
    ORA-06550: line 1, column 147:
    PLS-00201: identifier 'DBMS_LOCK' must be declared
    ORA-06550: line 1, column 137:
    PL/SQL: Statement ignored

    hi Santhosh,
    you may be able to use the query builder tool to do this.
    BusinessObjects Query builder - Basics
    if you need further info on using this particular tool let me know & i'll move your question to the bi platform space.
    you can also look into 3rd party tools such as rpt inspector which may be able to do this.
    -jamie

  • Migration of Database from Oracle to SQL Server in Business Objects XI 3.1

    Hi,
    Currently, We are working on Business Objects XI 3.1 and Database is  Oracle 11g. And now we have the requirement to migrate from Oracle 11g to SQL Server 2008 R2.
    I would like to know what are the key points to be considered in business objects XI 3.1 when the database is migrated from oracle to SQL server.
    If anyone can share the Impact analysis document for Business Objects, it would be great.
    Thanks,
    Lavanyaa TP

    If you use business objects tools for such migration , the impact should be minimal.
    CMSDBCopy mechanism from CCM should work fine for this purpose.

  • Integrating Business Object Attributes and Database attribute

    Newbie using Oracle BPM 11g
    I am trying the following:
    1)Display two process fields from Business Objects (say firstname, last name) and one field which is a dropdown (say branchcode) from database using ADF UI.
    2)Initiator enters the firstname,lastname and then selects a branchcode from the drop down and submits the form.
    3)A Reviewer has to view these three fields selected by the Initiator.
    My question is how do we enable the reviewer to see the branchcode selected by the Initiator(as it is list of values from database and not from a business object)
    Sudip

    Hi,
    unfortunately this didn't solve it.
    The confusing is, that I see the System in the loaded DQE window at the metadata loader, but the corresponding business objects of this system appear without any parameters.
    I have no idea what else to do!
    christoph

  • Using Business Objects to query the CRMOD database

    Has anybody successfully used Business Objects to query CRMOD via web services? Our BO people are trying to do this and would like to learn from other's experience.
    Regards,
    Jeff

    Please refer to online document "OnDemWebSvcs.pdf". You can download this doc at:
    Admin -> Web Services Administration -> Download Documentation
    Edited by: PPL on Oct 8, 2011 12:13 AM

  • Business object to Discoverer

    Hi All,
    Any documents available, for migrating reports from BO to Disc?
    Thanks

    I too am not aware of any way to migrate Business Objects reports to Discoverer.
    We are coming from a B.O. environment, though we are in the midst of an ERP implementation (non -EBS to EBS) so we are starting from scratch. Here are some of my thoughts:
    -If your data sources are not changing (e.g. your data warehouse or your relational database), I would closely examine your existing universes. I would anticipate a correspondence between your B.O. universes and your business areas in Discoverer. I would encourage creating ER Diagrams of the existing universes and this would be the building blocks for your work in Discoverer. I too am unaware of any nice tools to ease your pain.
    -I like John's suggestion: You could maybe look at doing custom folders, where you could copy in the SQL statement, and then rebuild the report in Discoverer from that custom folder
    -Our B.O. universes were pointing at a relational database and so we heavily leveraged using multiple Business Objects data providers with manual links between them. There is nothing like this in Discoverer. Brace yourself if you relied on this. This has been somewhat painful for me.
    -Discoverer appears to have more functions available in creating calculations.
    -Discoverer appears to me to be more rigid in totaling.
    -Discoverer has features to allow calculations that take into consideration context (like groups) that are similar to B.O., but feel less intuitive. I hope I change this feeling, but right now they feel awkward yet.
    -A lot of our old B.O. reports had multiple tables on one tab. You cannot do this in Discoverer. Discard any thoughts of trying this.
    -If your company has great aspirations for using the Discoverer scheduler, please lower its expectations. Emailing and output to files in multiple formats is not out of the box. Armstrong's book does provide some good alternatives if you still have great scheduling aspirations.
    -Memorize the Armstrong's Oracle Press Discoverer book.
    -Lastly, the user community does not seem/feel nearly as big, but people try to help one another.
    In many respects, I am still learning a lot (I have only been seriously working with Discoverer for about 8 months). If I made a wrong assertion, I am sure someone will correct me.
    Prepare yourself for a lot of work.
    Patrick

  • Business Query (or Business Objects) transparent sort

    Post Author: waldopepper
    CA Forum: Older Products
    We're using Business Query 6.5.1 to insert data into Excel and we've been doing for a while using a SQL 2000 database and making use of the useful 'transparent sort' feature that lets you order the query results by fields not actually in the selection.We've just started a similar project using a different database (same server) and whenever we create queries for this new database, the transparent sort button is disabled with Business Queries.The help file states: "Transparent sorts are only available if the database at your site supports them"
    It's definitely the database that is preventing this - we've used the same ODBC connection, Universe etc as the other DB that does work, just changing the DB it's accessing and it doesn't work when we switch databases to our new one.Does anyone have any idea what is preventing this? User permissions/rights, collation type etc?thanksw

    Hi Denis,
    Thanks for your response. I am aware that BO v5 is an outdated software but my client is still using it.
    I tried to replicate the BusinessQuery issue by using my citrix profile but I also got the same error whereas my colleague didn't have any BQ  issues with his profile.
    I assume that the citrix team had installed Business Objects v5 in shared environment on WTS long ago and all Citrix BO users will access Business query module with their own profiles. But the BOMAIN.key file didn't copied into shared folder which is under Business Objects installable folder and Citrix team had copied it at some local drive for some reason
    I asked the Citrix team to copy the BOMAIN.key file to affected user profile. Waiting to hear user response on output.
    Kind Regards,
    Srinivas

  • Business Object XI & archiving

    Is anyone aware of Business Objects working with any archiving vendor on the database side, i.e. IBM, HDS, EMC.
    thanks

    Hi Dell and Barry,
    Since Dell tested our archiving solution in 2006 we have added many features to the product. You can now also backup instances and documents. Documents can be backed up with multiple versions and you can pick which version to restore. You can do a partial restore of instances or documents if you lost anything instead of doing a full restore of the system.
    Our interface provides the ability to restore archived instances to where they came from or to a different location in case you have an audit and you want to prepare a special folder for the auditors to work in.
    We also let you export the report while archiving so you can keep a PDF or Excel version of the report in addition to the original and you can restore either. To save room on your disk you can have the files zipped while archiving.
    We also have an interesting housekeeping feature that will let you keep instances that were run by specific users or users from specific user groups while deleting the rest of the instances. This will let you keep your statements for example while deleting all other ad-hoc instances run by other users.
    If you use our KPI product as well you get a table with meta data about your instances which you can search. You can use the search results to find either online instances or archived instances. We have other tools which will let you enhance your instance handling with regards to scheduling, instance monitoring, instance searches, and other administration tasks.
    You can use the rich feature set in our tools as it is or we can customize tools to your needs if you have a more special set of requirements. Using our tools as the starting point for customization will save you a lot of time verses starting from scratch and we usually include any customization as part of the product itself which means it will automatically be upgraded for you when you upgrade to the next version of Business Objects as long as you are on maintenance. This means one less thing to tackle during the migration process.
    Please visit our web site at [www.apos.com|http://www.apos.com]. You can download freeware or get free trials of our various products.
    Thank you,
    Ofir

Maybe you are looking for