Using CMP 2.0 with existing DB Schema?

Hi.
From what I have read about CMP2.0 it seems that the container is responsible for creating the db schema after looking at the deployment descriptor.
I was wondering, is it still possible to use an existing database schema with CMP2.0? I dont know how this might impact the containers ability to handle/create the entity relationships specified in the DD..
Andy

in ejb2.0 specification ifthe table are not there then it will created the tables else it will use the existion tables which is specified in DD .i think it dont effect the performance i think.if u know about this more then write to [email protected]

Similar Messages

  • Need Help Can i use Merge command along with exist function in oracle?

    I am using Merge command to update the destination table and updating the rows which are already in the destination table.
    But what i want is to delete the existing rows from the destination table and insert fresh rows instead of updating the existing rows in the destination table.
    So can we use exist function to check the existing rows and delete them and use merge command to insert the rows in the table.

    You definitely need to do a DELETE then INSERT since MERGE will not delete rows, although I'm not really sure what that gets you since the net effect would be the same as a MERGE over the same pair of tables.
    If you really want to do it this way, then I would likely do something like:
    DELETE FROM target_table
    WHERE (columns_you_would_match_on) IN (SELECT columns_you_would_match_on
                                           FROM source_table
                                           WHERE predicate_you_would_use_in_using);
    INSERT INTO target_table (column_list)
    SELECT column_list
    FROM source_table
    WHERE predicate_you_would_use_in_using;John

  • Enquiry:  Any tool to reverse engineer an existing db schema in Oracle 8i

    Dear All,
    Do you know whether Oracle SQL Developer Data Modeler (3.1.1.703) supports Oracle 8i? If not, is there any tool that can be used to reverse engineer an existing database schema in Oracle 8i?
    Your early reply is appreciated.
    Thanks a lot.
    LAWRENCE CHOW

    That's a pity. The initial version of Data Modeler used to support import from Oracle 8i.
    You could try setting up an ODBC connection to your database and using the JDBC tab (rather than the Oracle tab) when entering the Connection details into Data Modeler.
    Alternatively, if you can get hold of an earlier version of Data Modeler (e.g. version 3.0 or earlier), you could try this (and if it works you could then upgrade your model to the current version).
    David

  • Can we use Case in Where Clause along with Exists

    Hi Everybody,
    Can we use Case in the where clause with exists? As i have a requirement in which i have to check whether value exists in 6 views, now depending on some value(gns_type )of select clause i have to attach a paticular exists else the performance dies.
    Please go through the query any suggestion appreciated.
    Thanks
    SELECT count(*)
    FROM
    (SELECT eah.changed_date,
    decode(eua.is_deleted, 'N', decode(eah.alert_type, NULL, 'GN', 'R', 'GAR', 'G', 'GAG', 'Y', 'GAY'), 'Y', decode(eah.alert_type, 'R', 'GDR', 'G', 'GDG', 'Y', 'GDY', NULL, 'GN'), NULL, 'GN') AS
    alert_type,
    decode(eac.pta_line, 'N', '') ptaline,
    eac.exp_type_desc,
    eac.supplier_name,
    eac.transaction_id,
    eah.gns_type,
    eac.po_amount,
    eac.po_end_date,
    eah.notes,
    eua.is_deleted,
    eac.expenditure_type,
    eua.gns_alert_summary_id,
    eah.changed_date alert_date,
    eua.user_alert_id,
    eah.reference_number,
    decode(eac.cms_pta_line,'N','',eac.cms_pta_line) cms_pta_line,
    cms_po_amount,
    cms_po_end_date,
    mgns.is_decommitted,
    eac.gns_alert_id,
    eah.gns_type source_name
    FROM xxdl.xxdl_sc_gns_alerts_summary eah,
    xxdl.xxdl_sc_gns_detail_alerts eac,
    xxdl.xxdl_sc_gns_user_alerts eua,
    xxdl.xxdl_sc_manage_gns_master mgns
    WHERE eah.gns_alert_summary_id = eac.gns_alert_summary_id
    AND eah.gns_alert_summary_id = eua.gns_alert_summary_id
    AND eah.transaction_id = eac.transaction_id
    AND eah.transaction_id = mgns.transaction_id)
    a
    WHERE(EXISTS
    (SELECT 1
    FROM xxdl_sc_mng_gns_pta_req_hc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS( SELECT 1
    FROM xxdl_sc_mng_gns_pta_inv_hc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS(SELECT 1
    FROM xxdl_sc_mng_gns_pta_req_sc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS(SELECT 1
    FROM xxdl_sc_mng_gns_pta_inv_sc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS( SELECT 1
    FROM xxdl_sc_mng_gns_pta_po_sc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS (SELECT 1
    FROM xxdl_sc_mng_gns_pta_po_hc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    AND TRUNC(alert_date) >= TRUNC(add_months(sysdate, -1))
    AND TRUNC(alert_date) <= TRUNC(sysdate)
    AND is_deleted = 'N'
    ORDER BY changed_date DESC

    you can do
    WHERE
    CASE WHEN (something) THEN
      CASE WHEN EXISTS (SELECT * from ...) THEN 1 ELSE 0 END
               WHEN (something else) THEN
         CASE WHEN EXISTS (SELECT * from ...) THEN 1 ELSE 0 END      
    END = 1Looking at your current query, it looks like all those exist statements could be a lot neater, maybe like:
    WHERE (69309,242528,34694) IN
    (SELECT project_id,task_id,award_id FROM
      (Select project_id,task_id,award_id,transaction_id,source_name
      FROM
      xxdl_sc_mng_gns_pta_req_hc_v
      UNION ALL
      Select project_id,task_id,award_id
      xxdl_sc_mng_gns_pta_inv_hc_v
      ...) x
    where a.transaction_id = x.transaction_id
    and a.source_name = x.source_name
    )or put the tuple in the where clause at the bottom

  • Using the Netbeans GUI within a Project with existing Ant Script

    I cannot seem to figure out how to use the Netbeans GUI in my Project with existing Ant Script. Is this possible? I have no problem creating GUI interfaces in a java Application, but attempting to make a new JFrame Form gives the error: package org.jdesktop.layout does not exist, and I have not been able to find a way around this. Any suggestions? Thanks in advance.
    Chris Coulon

    OK, I think I am on the right track, but I don't understand why I am still getting this error:
    clean:
    compile:
    Copying 1 file to /Users/chris/**JavaProjects/Netbeans_ImageJ
    Created dir: /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build
    Compiling 292 source files to /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:31: package org.jdesktop.layout does not exist
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:31: package org.jdesktop.layout does not exist
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:34: package org.jdesktop.layout does not exist
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:38: package org.jdesktop.layout does not exist
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    4 errors
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build.xml:11: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 6 seconds)
    I no longer have the error in my java code in the Projects list, but I still cannot build the project. This is my current build.xml file:
    <!-- Ant makefile for ImageJ -->
    <project name="ImageJ" default="run">
      <target name="compile" description="Compile everything.">
          <!-- Copy the swing layout library into dist.lib -->
        <copy file="dist/lib/swing-layout-1.0.3.jar" todir=".." />
        <!-- First, ensure the build directory exists. -->
        <mkdir dir="build" />
        <!-- Build everything; add debug="on" to debug -->
        <javac srcdir="." destdir="build" optimize="on" source="1.4" target="1.4" debug="on">
          <!-- The plugins directory only needs to be
                 present at runtime, not at build time. -->
          <!-- exclude name="plugins/**"/-->
        </javac>
      </target>
      <target name="build" depends="compile" description="Build ij.jar.">
        <!-- Copy needed files into the build directory. -->
        <copy file="IJ_Props.txt" todir="build" />
        <copy file="images/microscope.gif" tofile="build/microscope.gif" />
        <copy file="images/about.jpg" tofile="build/about.jpg" />
         <copy file="plugins/MacAdapter.class" tofile="build/MacAdapter.class" />
        <copy todir="build/macros"><fileset dir="macros"/></copy>
        <!-- Build ij.jar. -->
        <jar jarfile="ij.jar" basedir="build"
             manifest="MANIFEST.MF" />
      </target>
      <target name="clean" description="Delete the build files.">
        <delete dir="build" />
        <delete file="ij.jar" />
      </target>
      <target name="run" depends="build" description="Build and run ImageJ.">
        <copy file="ij.jar" toDir=".." />
        <java maxmemory="640m" jar="ij.jar" fork="yes" />
      </target>
      <target name="run2" depends="build" description="Build and run ImageJ.">
        <!-- Run in ImageJ directory -->
        <copy file="ij.jar" toDir=".." />
        <java maxmemory="640m" dir=".." jar="ij.jar" fork="yes" />
      </target>
      <target name="zip" depends="clean" description="Build zrc.zip.">
        <zip zipfile="../src.zip"
           basedir=".."
           includes="source/**"
        />
      </target>
      <target name="javadocs" description="Build the JavaDocs.">
        <delete dir="../api" />
        <mkdir dir="../api" />
        <javadoc
               sourcepath="."
               packagenames="ij.*"
               destdir="../api"
               author="true"
               version="true"
               use="true"
               windowtitle="ImageJ API">
        </javadoc>
      </target>
       </project>notice I added this line: <copy file="dist/lib/swing-layout-1.0.3.jar" todir=".." />
    because the dir ".." is where the other jar files are placed, i.e.:
    [GAIAG:~/**JavaProjects/Netbeans_ImageJ/source] chris% ls ..
    PolarDisplay          ij.jar               swing-layout-1.0.3.jar
    TestFrames          myApp
    api               source
    So why is the build not able to see the package org.jdesktop.layout in the jar file?
    Chris

  • How to use CMP with Inheritance?

    I've a thorny problem with 2 EJBs which I hope I can use CMP for persistence.
    I'm supposed to implement a web-based forum and I'm thinking of using a ForumThread entity bean and a ForumReply entity bean to store the postings/messages in the forum.
    A ForumReply, according to OO design, is the same as a ForumThread (which is the first message of a topic) except that they've a parent thread/reply. So I thought of using Inheritance with the ForumThread as the parent (base) class and ForumReply as the sub (derived) class.
    But it seems that CMP in EJB 2.0 does not support this relationship as yet. Is there any way to workaround this limitation without having to remodel the relationship? What should I do in such a situation? Anyone care to share how he overcome this?
    It's not quite possible to give up inheritance in OO design simply because EJB 2.0 CMP doesn't support it right? We end up creating bad softwar design.
    So do I have to go back to using Bean Managed Persistence in this case?

    I hate CMP. Why don't you use JDO or Hibernate?
    Anyway, if you want to do it with CMP, here is your solution: http://www.theserverside.com/resources/article.jsp?l=EJBInheritance

  • Just installed a new time capsule and i want to use my airport express to extend my wireless range....time capsule working with existing devices at this time...but i am not able to get airport utility to recognize the airport express.....????

    just installed a new time capsule and i want to use my airport express to extend my wireless range....time capsule working with existing devices at this time...but i am not able to get airport utility to recognize the airport express.....????

    Temporarily connecting your AirPort Express to one of the Time Capsule's Etherent LAN <-> ports...as LaPastenagure suggests....is always a good way to setup and configure other network devices.
    If you want to configure the Express using wireless, remember that the Express broadcasts a default wireless signal with a name like Apple Network xxxxxx. You must log on to this network first....no password is required....then open AirPort Utility to "see" the AirPort Express.

  • Trouble using MS SQL Server with CMP EJBs

    Hi all,
    I have an application which uses CMP EJBs. I am migrating it from a DB2 backend (where it works like a dream) to a SQL Server 2000 backend. I am using WebSphere 5.0 and I am able to launch the application on the test server without problems, but when I run the EJB test client and try to create any of the EJBs, I get a mass of exceptions - the most pertinent part of which seems to be:
    Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/msissuetracker, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a PooledConnection from the DataSource.
    Why am I unable to get a PooledConnection? I am using the JDBC driver which I downloaded from the MS website, and the doco says it supports connection pooling. I am very unfamiliar with SQLServer, so can anyone tell me if I'm missing something here??
    Help much appreciated! Cheers, Ben.

    Problem is now sorted. A bit embarassing really. It was a permissions issue. Nothing about permission or access denied was mentioned anywhere in the few hundred lines of exceptions. A more descriptive exception message would have been helpful instead of "Unable to get a PooledConnection from the DataSource". Yes! But WHY?

  • CMP Entity Bean with database specific features

    Hi there,
    I�m studying Entity Beans and I'm doing some experiences with SQL Server.
    At first, I built a CMP Bean and marked in deploytool to create the tables. Ok, it worked.
    Now, I'm trying to interact to an existent database. But, I got a problem: the primary key is defined by the Server. I can read it and I can remove entries. But, when I try to insert some entry, I can't pass the key in SQL statement. I edited the generated statement to do it, but it doesn't work. I get a RollbackException.
    My question is: is it possible to do what I'm intending to do with CMP? What am I doing wrong?
    Do you think that, to do this, I should use BMP Entity beans?
    Thanks in advance,
    Anicio

    "CMP provides you with database independence and less coding efforts."
    BMP is not database dependent, unless you invoke database specific things in your SQL (something I do not do). CMP on the otherhand is inherently appserver specific (which was it's goal when BEA, IBM, et al. came up with it), and still limits your design possibilities. See this thread for an example:
    http://forum.java.sun.com/thread.jsp?forum=13&thread=318785
    As for less coding effort, that is a relative statment. Yes a simple CMP bean requires less coding to develop the first time. I personally view a few lines of SQL to load and store the data as being fairly trivial. But that needs to be offset with the problems inherent in using appserver specific CMP implementations.
    As an example, try mapping WebSphere CMP to a pre-existing database without using IBM's IDE. It's an incredible pain in the ass since WebSphere does not come with a "meet-in-the-middle" solution. Any J2EE developer that has had the experience of working with different appservers (especially if they have had to port an app, as I have) can attest to the complications that arise with each implementation.
    A BMP bean, written with non-DB-specific SQL, is the most portable, most flexible approach to EntityBeans. Yes, it requires the developer to be able to write some SQL, which should not take a significant amout of time. WRT queries, you have to write them, either SQL, EQL, or some appserver specific format.
    As an aside, the use of code generators to simplify the creation of EJBs lends itself well to BMP. By using a (or writing your own) code generator, you can mitigate the annoying SQL bugs that creep up early in development.

  • Using Page Text Item in an Authorization Scheme

    Hello,
    I will be having a text item is every page say, Px_RESP_ID (hidden and its value set in an earlier page), and want to use its value in an authorization scheme to verify if the user has an access to the page.
    I'm using the following SQL in the authorization scheme -
    Apex Version: Apex 3.2
    Scheme Type: Exists SQL Query
    SQL:
    SELECT 1
    FROM zs_users zu
    , zs_responsibilities zr
    , zs_user_resp_groups zur
    WHERE
    zu.user_name = :APP_USER
    AND zr.resp_id = '&P'||:APP_PAGE_ID||'_RESP_ID.'
    AND zu.user_id = zur.user_id
    AND zr.resp_id = zur.resp_id
    For some reason this approach is not working. Any ideas to help me move forward will be greatly appreciated.
    Regards,
    Seshu

    AFAIK an application item, or maybe a page 0 item, is the only way to do this (as those items effectively exist across all pages of an application). Unfortunately since authorization schemes are application-level, you can't really effectively reference page items at runtime since you aren't necessarily on that page.
    The other option is an ugly one. Instead of creating one auth scheme (e.g.: "user_has_whatever_authority"), create one for every page (e.g.: "user_has_whatever_authority_1", "user_has_whatever_authority_2", etc.) and attach each auth scheme to each page by matching up the number in the name with the page. But this is a maintenance nightmare and terrible style IMHO, but it'll work. Your colleagues will hate you for it when you're gone though.

  • ERROR: MyService.jws:715:There are two or more operations with the same schema-element 'ns0:MyNameSpace' on the input message in a web service file or callback interface.

    I have two web service operations that have the same complex type as their input
    parameter. I want to map this type to an existing schema. I can successfully
    do this with the first operation using XQuery but when I attempt to do this with
    the second operation I get the following error:
    ERROR: MyService.jws:715:There are two or more operations with the same schema-element
    'ns0:MyNamespace' on the input message in a web service file or callback interface.
    ERROR:      SUGGESTION: Use different schema-element values for each of those operations.
    How can I use different schema-element values? The input parameters are to be
    mapped to the same schema and same element since they are the same for both operations....

    I am having the same problem. How did you resolve this..?? could you please tell me the solution??
    Thanks
    Shari

  • Communication Channel - Integrating with existing iMS52 and iDS52

    Hi,
    Any one tried integrating Portal Server JES2004Q2 channels with existing iMS52 and iDS52?
    How about schema? Did you use the existing Dir for configuration? Please share, as at the moment we are encountering problems even installing it. Anyway that's a different story.
    Regards,

    Use Runtime Workbench -> Component Monitoring -> Communication channel monitoring
    U could not start or stop individual communication channel through Visual Admin. U can start or stop whole adapter through it.
    Regards,
    Prateek

  • Integrating standalone OC with existing 3rd party LDAP directory question

    Hello everyone,
    we have a standalone version 9 Oracle Calendar server with internal directory. We also have an existing enterprise wide LDAP directory. We would like to integrate them together, with as few changes to our existing LDAP schema as possible. Has anyone dealt with this issue before? Are there any documents out there describing how to deal with such situation? What if we upgrade to OC version 10 first?
    Thanks

    Migration might be tricky -
    We've been running Calendar since the Netscape era with external LDAP. Basically user's preferences are stored in LDAP, though these can be 'regenerated' on the fly by the client using defaults.
    You will need to modify the schema, but it's simply as loading the supplied schema file.
    Data itself is still maintained in the internal DB. The link between the DB and LDAP is done via the calendar ID number which gets stored in the user's entry in ldap.
    I don't think it would matter on upgrading OC to 10 or not, since the upgrade would not modify anything on the LDAP side (schema has not changed).
    You should set up a test environment and test it out...

  • Reuse existing ODS schema

    Hello. Here's the scenario. OID 11g.
    Node 1 corrupted install (existing ODS database schema still valid, contains users, etc.)
    Install OID on Node 2, trying to use that existing ODS schema.
    So my question is, can I simply install the proper version of OID on Node 2 and reuse that existing ODS schema? I was prompted (running config) with a warning and it will allow me to continue, but wanted to confirm.
    Also, after I specify the schema, I am prompted to enter the OID administrator password, and I am told the LDAP is not running. This doesn't seem like an issue because node 1 is actually down.
    Thank you.

    Too late. I already did it and it worked.

  • Characterstics updating (replacing with existing) via BO issue?

    Hello i have crated a BO for updating(replacing with existing) the existing Characteristics, basically want to overwrite the existing char values. the schema i have created to do this as follows
    BO Name: CmPremChUpd
    <schema>
    <premiseId mapField="PREM_ID"/>
    <premiseCharacteristic type="list" mapChild="CI_PREM_CHAR">
    <characteristicType mapField="CHAR_TYPE_CD"/>
    <effectiveDate mapField="EFFDT" default="%CurrentDate"/>
    <characteristicValue mapField="CHAR_VAL" default=""/>
    <adhocCharacteristicValue mapField="ADHOC_CHAR_VAL" default=" "/>
    <version mapField="VERSION"/>
    </premiseCharacteristic>
    </schema>
    in my BPA i am have written following code ..
    default $CmPrmCharUp as 'CmPremChUpd';
    declareBO $CmPrmCharUp as 'CmPremChUpd';
    if ("string (CM_PRM_UI/bo/parcelId) != $BLANK")
    move null to "CmPremChUpd";
    move "$premiseId" to "CmPremChUpd/premiseId";
    move 'WTRCOM' to "CmPremChUpd/+premiseCharacteristic/characteristicType";
    move "$wtrComVal" to "CmPremChUpd/premiseCharacteristic[last()]/adhocCharacteristicValue";
    move "$CURRENT-DATE" to "CmPremChUpd/premiseCharacteristic[last()]/effectiveDate";
    move "1" to "CmPremChUpd/premiseCharacteristic[last()]/version";
    invokeBO $CmPrmCharUp using "CmPremChUpd" for replace;
    if ("$ERROR")
    terminate;
    end-if;
    end-if;
    when i exicute i am getting the following error,
    Detail of Schema input error: BO Replace action for BO BusinessObject_Id(CmPrmCharAddBO1) with request <CmPremChUpd><premiseId>0132173400</premiseId><premiseCharacteristic><characteristicType>RCL_SORC</characteristicType><adhocCharacteristicValue>0132173400</adhocCharacteristicValue><effectiv
    eDate>2012-11-26</effectiveDate><version>1</version></premiseCharacteristic></CmPremChUpd> requires the version to be supplied.
    i tried different things like keeping the version and adding the version in BO schema, but still no luck. Appreciate if any one has solution to resolve this.

    Thanks for your reply Neil.
    Okay, so I created a new app via the DPS App Builder, filled in all the app details plus the mobile provision files.
    Inserted the dev p12 certificate plus passwords and tested the app on my iPad with great success.
    The problem I am having now is downloading the distribution app.
    When I click Distribution App in the Downloads column of my new app, select my p12 distribution certificate and proceed to enter the password, a red square is seen around the Distribution P12 Certificate box.
    I have used the same certificates as last time as instructed.
    Do you think there may be a problem with the fact that there are now 2 apps in the DPS App Builder using the same P12 Certificate even though I will be replacing the old one in iTunes when I get there?
    Any help would be much appreciate.
    Thanks
    Myles

Maybe you are looking for