Using oracle db sequence for auto generating of PKs for CMP entity beans

Hi,
I have read quite a number of threads about (auto) generation of keys for primary keys for the CMP entity beans.
My requirement is I am migrating an application deployed on Weblogic to oc4j. The application is using cmp entity beans with auto key generation using a sequence in the Oracle db. This is specified in weblogic-cmp-rdbms-jar.xml file like below:
<automatic-key-generation>
<generator-type>Oracle</generator-type>
<generator-name>REPUSER.DEPT_REPORT_SEQ</generator-name>
<key-cache-size>1</key-cache-size>
</automatic-key-generation>
In the ejb-jar.xml, it is specified as:
<prim-key-class>java.lang.Integer</prim-key-class>
<primkey-field>id</primkey-field>
Now, I need to migrate this to oc4j. Can somebody suggest me options and clarify my questions kindly?
1) I have read articles that say that in the ejb-jar.xml, we need to specify <prim-key-class>java.lang.Object</prim-key-class> and this will create a column called 'autoid' in the respective entity table in the Oracle db.
- How can I use this to assign the value to my primary field, say, id?
2) Now, with the latest oc4j, can I use Oracle database sequence as the key generator for the values of the PKs just by specifying in the xml descriptor ejb-jar.xml?
2.a) If yes, is there any article that explains with the code?
2.b) If no, what are the alternatives I have?
I have read many discussions that say that we can create a stateless session bean that can lookup the database sequence using simple JDBC call to return the nextval of the sequence. The SSB should be called in the ejbCreate() of the entity bean.
My related question is, what is recommended for oc4j? What are limitations of the various options for the latest oc4j available?
How should I go about deploying this kind of ejbs in oc4j?
Any help and pointers are welcome. Please help.
Thanks a lot.
Vadi

Hello ,
Instead of exposing a get/set method for each arribute of your bean (corresponding to database table) expose only one object.
For example
public class CustomerBean implements javax.ejb.EntityBean{
private CustomerVO objCustomer;
private String customerName;
private String customerMail;
private String customerType;
public CustomerVO getCustomer(){
return this.objCustomer;
public void setCustomer(CustomerVO objCustomer){
this.objCustomer = objCustomer;
public void ejbStore(){
customerName = objCustomer.getName();
customerMail = objCustomer.getMail();
customerType = objCustomer.getType();
HTH
VJ

Similar Messages

  • Mail 4.4 Reply Forward Icon Not Displaying for Auto-generated emails

    Does anyone have a problem with Mail 4.4...
    For auto generated emails (system generated or confirmation emails), when forwarded these email, little icon on the left that pops up, its just simply not showing up...???!!!
    And for the all other emails it works like it should...
    Anyone? Solution? Help?

    I finally figured out how to make this work for 2 accounts on exchange.  I created my main account and then adding another account  that I'm delegated for within the account.  I also tried my main account and adding IMAP account with still no luck.  What I ended up doing was adding two separate exchange accounts and named them appropriately.  This solved the problem of sent messages going to the proper sent items folder and arrows appearing for Reply and Forward email responses on all machines.  Works like a charm

  • Use oracle native sequence

    How one can use oracle native sequence in Insert/update in a Toplink POJO?
    Thanks in advance...

    Just set the Oracle Sequence name as the descriptor's sequence name (ClassDescriptor.setSequenceName()), and configure your Session to use native sequencing.
    If you are using JPA you need to use a @SequenceGenerator see,
    http://en.wikibooks.org/wiki/Java_Persistence/Identity_and_Sequencing#Sequence_objects
    James : http://www.eclipselink.org

  • Re: Using CMP Entity Beans in Business Logic

    One thing that you need to answer here is
    "In the queries for the subsequent tables, in the where clause will the fields be the same and is it that only their values change?"
    In the above is true I'd suggest going for a CMP as you save a lot of coding and transaction management out there.
    If the above is not true and even the fields in the where clause change on fly there is no way that you can go for CMP. You will have to go for BMP.
    Hope this helps decide

    Hi.
    You might try posting this message to the weblogic.developer.interest.cmp
    newsgroup.
    Regards,
    Michael
    Pankaj wrote:
    Hi,
    I have made a few CMP entity beans which are mapped to single tables in
    Oracle 8i.
    Create and remove of a row is working fine via the entity bean.
    But when i try to update a particular row it is not happening.
    The steps that I am doing are :
    1. call home.findByPrimaryKey(instance of the Primary key class)
    2. remote.setXXX for the field to be modified.
    when i invoke setXXX() method the methods are called in the following
    sequence : ejbLoad() > setXXX() > ejbStore()
    but the data is not getting persisted in the Data base ....in the column it
    is still the same old data.
    is it something to do with a commit call or some configuration issue??....
    Is there any other step to be called
    I am using Weblogic 6.1 Sp2
    Any help will be appreciated....This is really urgent...
    Thank you,
    Pankaj--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • How to use same transaction when calling CMP entity beans and  DAO (JDBC)

    We are currently using Weblogic 8.1 SP2 with an Oracle 10g database (using XA thin and non-XA drivers).
    We have a session bean that invokes an entity bean and a DAO (data access object pattern) in order to add data in 2 separate tables (account and history). Rows are added to the first (account) table using a CMP Entity bean while inserts are done in the 2nd (history) table using a DAO. Here is some pseudo code:
    addHistorySessionBean (trans-attribute="Required")
    begin
    Step #1 - call addAccountEntityBean (trans- attribute="Required")
    Step #2 - call addHistoryDAO (get datasource, connection)
    end
    The 2nd table (history) has a foreign key constraint to ensure that the corresponding key exists in the first (account) table. Unfortunately, DAO inserts on the 2nd (history) table fail with a foreign key constraint violation (INTEGRITY CONSTRAINT VIOLATION - PARENT KEY NOT FOUND!) since they cannot see the row added to the 1st (account) table in step #1 by the CMP entity bean.
    How does one ensure that all this is done in a single transaction ? It appears that the app server creates two seperate transactions (one for the session bean facade and the entity bean and a 2nd transaction (when we retrieve a connection using the same data source JNDI name) for the DAO.
    A post on server side suggested using a "<resource-ref>" in the session bean to tie the two potentially separate transactions together, but that does not work for us. However, I am not sure if we are doing that correctly. After we define the resource ref in the session facade bean, do we use the resource ref "name" attribute to lookup the datasource or do we still lookup the datasource by JNDI name ? Do we need to define the resource-ref tag in the entity bean also ?
    Does Weblogic allow using a single transaction for this type of a scenario ? How does one specify within Weblogic that the same transaction should be utilized by the entity bean and any subsequent DAOs?
    People have also suggested that we defer constraint checking until the transaction(s) are committed but that sounds like a work acount without addressing this issue. Would postponing the constraint checking in Oracle cause any additional overhead ?
    Any suggestions with specific examples or documentation on how to address this issue will be gratefully appreciated.

    Thanks for your suggestion. Unfortunately, this does not work since it appears that there are 2 separate transactions going on here. One, the original one initiated by the session bean and used by the entity bean and the other initiated by the DAO. Any other ideas appreciated.
    Hi,
    Try setting the delay-database-inserts tag to
    ejbCreate in RDBMS descriptor file.
    http://bernal/stage/wls/docs81/ejb/DDreference-cmp-jar
    .html#1113981
    vasanthi ramesh

  • Use direct JDBC with CMP entity bean in one transaction

    I am trying to use direct JDBC call with CMP entity bean within a session
    bean method that requires transaction. The problem is that it appears these
    are not in the same transaction. When I use the JDBC call, the CMP entity
    bean update to the DB has not been committed yet.
    We are using Weblogic 5.1 SP6. The DB is Oracle.
    What I do for the JDBC is get a new connection from the pool using weblogic
    jdbc pool driver.
    Any help would be appreciated.
    Patrick

    Hi. You can do JDBC and invoke CMP EJBs and have this all treated
    as one transaction, if your hand-written code explicitly starts
    a JTS transaction, then uses the jts driver or a TxDataSource to
    get the JDBC connection. Then your code can call transactional
    EJBs and their work will be included in the transaction you started.
    Assuming the bean work went OK, and your manual JDBC went OK, you
    can manually commit the UserTransaction at that time. This is 5.1
    talk. For 6.0, with @PC, this may be even easier...
    Joe
    Patrick Shen wrote:
    >
    But if I do that, then they would not be in the same transaction anymore.
    Is there any way to use JDBC with CMP Entity bean in the same transaction?
    Patrick
    "L'artiste" <[email protected]> wrote in message
    news:[email protected]...
    Are you calling all the CMP create in the session Bean ? If so, beforeyou
    make the JDBC call from the session bean, the CMP in 2. should commit. Try
    to set its attribute to TX_REQUIRES_NEW. This way, the calling client will
    block until this transaction is done (committed) before the execution
    continues. There might be some overhead involved in doing so if you are
    anticipating a lot of users.
    "Patrick Shen" <[email protected]> wrote in message
    news:[email protected]...
    What I am trying to do is:
    In a Session bean method -
    1. create a new CMP entity bean (a new row in DB table)
    2. create another new CMP entity bean that uses previous bean as foreignkey
    3. use JDBC to update the row just created
    And all these 3 calls have to be in one transaction.
    Thanks,
    Patrick
    "L'artiste" <[email protected]> wrote in message
    news:[email protected]...
    Can you give a little bit more information?
    Do you have methods in your session bean that creates this CMP entitybeans?
    It looks like
    you might wanna try to change the isolation level to
    TRANSACTION_READ_COMITTED
    to preven dirty_read.
    "Patrick Shen" <[email protected]> wrote in message
    news:[email protected]...
    I am trying to use direct JDBC call with CMP entity bean within a
    session
    bean method that requires transaction. The problem is that it
    appears
    these
    are not in the same transaction. When I use the JDBC call, the CMP
    entity
    bean update to the DB has not been committed yet.
    We are using Weblogic 5.1 SP6. The DB is Oracle.
    What I do for the JDBC is get a new connection from the pool usingweblogic
    jdbc pool driver.
    Any help would be appreciated.
    Patrick
    PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
    for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
    We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
    Send resumes to [email protected]

  • CMP Entity Bean wrong generated ejbfindByPrimaryKey

    i am using Netbeans 6.1
    with GlassFish V2
    and JavaDB
    i wrote a basic CMP Entity Bean and it gives me this exception
    JDO74004: Bean 'ProducttbBean' method ejbFindByPrimaryKey:
    com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
    SQL statement<select t0."PRODUCTID", t0."PRODUCTNAME" from "PRODUCTTBBEAN" t0 where t0."PRODUCTID" = CAST (? AS INTEGER)> with input values:java.lang.Integer:1.
    Please examine the SQLException for more information.
    NestedException: java.sql.SQLSyntaxErrorException: Table/View 'PRODUCTTBBEAN' does not exist.
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.retrieve(SQLStateManager.java:2059)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1197)
    at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1153)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:658)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:276)
    at mybeanspack.ProducttbBean_2002768886_ConcreteImpl.ejbFindByPrimaryKey(ProducttbBean_2002768886_ConcreteImpl.java:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
    at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
    at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
    at com.sun.ejb.containers.EntityContainer.invokeFindByPrimaryKey(EntityContainer.java:803)
    at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:233)
    at $Proxy22.findByPrimaryKey(Unknown Source)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java from :63)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    the table name i'm querying at is
    PRODUCTTB
    and in the generated select statement
    PRODUCTTBBEAN
    i need help to solve this problem

    This is a copy of the sun-cmp-mappings.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-cmp-mappings PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 OR Mapping//EN" "http://www.sun.com/software/appserver/dtds/sun-cmp-mapping_1_2.dtd">
    <sun-cmp-mappings>
    <sun-cmp-mapping>
    <schema>BOOSHA_CMPBeanApplication-ejb</schema>
    <entity-mapping>
    <ejb-name>ProducttbBean</ejb-name>
    <table-name>PRODUCTTB</table-name>
    <cmp-field-mapping>
    <field-name>productid</field-name>
    <column-name>PRODUCTTB.PRODUCTID</column-name>
    <fetched-with>
    <default/>
    </fetched-with>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>productname</field-name>
    <column-name>PRODUCTTB.PRODUCTNAME</column-name>
    <fetched-with>
    <default/>
    </fetched-with>
    </cmp-field-mapping>
    </entity-mapping>
    </sun-cmp-mapping>
    </sun-cmp-mappings>
    the table name is right in the descriptor.

  • GetId () returns 0 for CMP Entity Bean

    Hi
    I'm currently using the HR OE schema that you can download from otn to do some test with EJBs. After creating an CMP Entity Bean, deploying it to the container that comes with JDeveloper9i and accesing it via the Sample Client I get 0 for the id column. All other columns works fine the only one showing a value of 0 is the id column.

    I have created a CMP bean and when I use the create method,it inserts 0 in the primary key filed.This only happens if I do not supply a value for that field in the method.So try to check the create method and make sure that the primary key argument is there.In other words,oracle container inserts 0 in the primary key filed if no argument is supplied.
    Regards,
    Madani

  • Error while using sybase trigger with the CMP entity bean,ejb version 2.1

    Hi All,
    I am using ejb version 2.1 and using entity bean (Transaction required) ,i am trying to update data in sybase(ver 12.3) database table
    I am using session bean(Transaction required) to update the multiple entity beans in a while loop.It is working fine .But when i am trying to run it with the trigger which updates multiple tables in different sybase databases on update of each entity.Then it throws NoSuchEntityException and it rollback the whole transaction.
    My trigger has only few simple update statements and the trigger runs fine without my CMP entity bean.is the CMP does not support the update triggers in sybase or is it the problem with the transaction.
    Please help
    Thanks
    Anshu

    If you can have a look at a cmp example in the samples that ship with the server. My guess is that the weblogic-ejb-jar.xml file is missing the <persistence-use> element which for 810 would look like:
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    I seem to recall that the elements might be slightly different in structure for the wls700 version of the DTD, so please check that (I cannot, I'm at home and don't have everything here).
    Give that a try and see if it doesn't solve your compilation failure.
    Also, the compilation should not be throwing a null pointer exception in a case like that, I consider that to be a bug.
    -thorick

  • Using a CMP Entity Bean local stub as a field of another CMP Entity Bean

    Hello,
    Is it possible to implement a field of a CMP Entity bean as another CMP Entity bean and how is it done?
    I've seen a pseudo code for this in Ed Roman's Mastering EJBs, second edition, but I can't seem to get it to work (pages: 330 - 1:1 using CMP and 339 - fake M:N using CMP).
    I'm using SUN ONE Application Sever 7. Is this server capable of this?
    I'm trying to implement a fake M:N relationship using 3 beans: 2 for each side of the relationship and one as the "bridge" table.
    For example, the two beans on each side of the relationship are SubscriberBean, SubscriptionBean and the "bridge: bean is SubscriberSubscriptionBean. The SubscriberSubscriptionBean has two fields: SubscriberLocal stub and SubscriptionLocal stub.
    Please let me know if you need more information to answer this question.
    Thanks.
    Nikola

    Im sorry but i dont know about the example you are talking about. I kinda learn
    all those techniques from forums, articles and tutorials because book often suffer from
    not having the information im mostly looking for.
    As far as i understand you, you want to implement a bridge been, which is representing a row in a join table. So that if one side of the relation is deleted the join-table entry (your bridge-CMP-Bean) is cascaded. Right?
    First of all the simple part: (My approach)
    - The joint table is foreign keys only - without a relation description. -
    In this case you dont have to implement a bridge bean. Because it just wouldnt represent anything of sense.
    Lets think of an entity/table USER whith the columns name (PRIMARY KEY), and prename.
    Our second entity/table is ADDRESS with the columns road (PRIMARY KEY) and housenr.
    The join table is simply: USER_ADDRESS with fk_name (FOREIGN KEY) and fk_road (FOREIGN KEY) both on CASCADE DELETE. So if the address is deleted the mapping entry is deleted, too same for the user part:
    USER -> USER_ADDRESS <- ADDRESS.
    Our entity Beans are called User and Address in class-names JNDI-names and names.
    Now we want to create the CMR mapping so we can access the addresses of a user from the user bean directly. The methods on the user side are:
    public abstract Collection getAddresses();
    and
    public abstract void setAddresses(Collection new_addresses);
    the xdoclet comments on the User side are (for the getter only)
    * @ejb.interface-method
    * @ejb.relation
    *                name = "User-has-Addresses"
    *                role-name = "User-Addresses"
    *                target-ejb = "Address"
    *                target-multiple = "true"
    * @sunone.relation
    *                column="USER_ADDRESS.fk_name"               
    *                target="USER_ADDRESS.fk_road"               
    public abstract Collection getAddresses();
    for the other side of the relation we define in the Address-Entity
    public abstract Collection getUsers();
    and
    public void setUsers(Collection users);
    the xdoclet comments on the Address side are (for the getter only)
    * @ejb.interface-method
    * @ejb.relation
    *                name = "User-has-Addresses"
    *                role-name = "Address-User"
    *                target-ejb = "User"
    *                target-multiple = "true"
    * @sunone.relation
    *                target="USER_ADDRESS.fk_road"               
    *                column="USER_ADDRESS.fk_name"
    As we dont want the user or address to be deleted if the other side of the relation is deleted we dont specify cascade-delete="yes" in the ejb.relation namespace.
    The sun-cmp-mappings.xml should now look like this:
    (For the User - side)
    <!-- Relationship User-has-Addresses, role User-Addresses -->
    <cmr-field-mapping>
    <cmr-field-name>addresses</cmr-field-name>
    <column-pair>
    <column-name>USER_ADDRESS.fk_name</column-name>
    <column-name>USER_ADDRESS.fk_road</column-name>
    </column-pair>
    </cmr-field-mapping>
    and similar on the Address-Side:
    <cmr-field-mapping>
    <cmr-field-name>users</cmr-field-name>
    <column-pair>
    <column-name>USER_ADDRESS.fk_road</column-name>
    <column-name>USER_ADDRESS.fk_name>/column-name>
    </column-pair>
    </cmr-field-mapping>
    Dont forget that all elements in the Collection must be of the right Interface-type.
    First of all the harder part:
    Now what you might want is when the relation has some information specified like user live at address and is tenant or facility manager.
    The, in the first step you will have to implement the UserAddressRelation entity which will have to CMR fields of the 1:N type.(Just as you wish)
    Lets think of the example above extended by the relation type. Our relation bean is named UserAddressRelation.
    Now User has the methods as above but the classes in the Collection must now be of the UserAddressRelationLocal/Remote interface and not AddressLocal/Remote-interface.
    You will have to change the xdoclet comment to:
    * @ejb.interface-method
    * @ejb.relation
    *                name = "User-has-Addresses"
    *                role-name = "User-Address"
    *                target-ejb = "UserAddressRelation"
    *                target-multiple = "true"
    * @sunone.relation
    *                target="USER_ADDRESS.fk_name"               
    *                column="USER.name"
    So we now dont reference the other side bean directly. We reference the relation EntityBean. Do the similar changes on the other side.
    In particular you will have to specify 4 CMR mappings now:
    1. User to UserAddressRelation 1:N
    2. UserAddressRelation N:1
    3. Address to UserAddressRelation 1:N
    4. UserAddressRelation N:1
    Which i dont want to explain in detail now because its kinda all the same as above.
    Now you cann access the Addresses of a user in the way.
    UserLocal.getAddresses(); <- !you get the mappings!
    UserLocal.getAddresses().item(0).getAddress() <- you get the address (this is dirty coding just for understanding)
    UserLocal.getAddresses().item(0).getUserRole() <. you get the role of the user at this address.
    Hope this helped you. You are welcome to ask any detailed question.

  • CMP Entity beans using local interfaces

    Why CMP entity beans with CMR relation ship using local interfaces only?
    Why we should not use remote interface to get the CMR field relationship?
    Pls give me the solutions

    "Local interfaces provide the foundation for container-managed relationships among entity beans and session beans. The bean uses the local interface to maintain its references to other beans. For example, an entity bean uses its local interfaces to maintain relationships to other entity beans. Using local interfaces, beans can also expose their state and use pass-by-reference to pass their state between related bean instances. "
    http://java.sun.com/developer/technicalArticles/ebeans/EJB20CMP/

  • How to use Oracle DB Sequence to Generate Primary Key Values?

    Dear Members,
    I am using Oracle JDev V 11.1.2.1.0 and Oracle 11g XE Database.
    I have followed the below steps:-
    1/ Created an EmployeesEO
    2/ Created an EmployeesVO
    3/ Created a JSPX Page
    4/ On the JSPX Page I have dragged the EmployeesVO and created it in ADF Table Format.
    On this page when I create a new record, I want to generate employee id automatically based on a sequence which is created in the database of the HR Schema.
    Please let me know how to achieve the above requirement.
    Many thanks in advance.
    Regards.

    check [url http://mjabr.wordpress.com/2011/03/11/make-sequence-number-as-default-value/]Set an attribute’s default value with a sequence number

  • Anyone know of a tool for auto generate EJB from DB

    Does anyone know of a tool that connects to a DB and auto generates EJBs from the table schema, either CMP or BMP. Perhaps allowing you some control over choosing the table, pk, etc.
    THANKS

    Visual Age for Java (IBM)
    Websphere Studio Application Developer (IBM)
    I think JBuilder has this option now. Is JBuilder still free?

  • Auto generate CRUD packages for tables

    Hi there
    Is there any tool which can auto generate select/insert/update/delete packaged procedures in PL/SQL? I know that JPublisher can then create Java wrapper classes based on these packages, but it seems that the first step wouln't be that hard to implement. In fact, maybe I'll od it myself if nobody did it so far...

    Hi SQL nevigator has this fecility. you can get the crud matrix using following menu option.
    EDIT -> Insert ->Crud MAtrix
    Regards

  • Using Solution Manager 7.0 to Generate Solution Key for SAP Netweaver 7.3 ?

    Hi, SDN Gurus.
    We are running Solution Manager 7.0.
    I am trying to generate solution key for SAP Netweaver 7.3 system. When I was creating a new system (in TCode SMSY);  I only see Newtweaver 7.1 is the latest version available in the SAP Netweaver  product version drop down list.
    Is that true that I always need to upgrade the latest/compatible version (SP & patches) of SAP Solution Manager to generate solution key for the latest released of SAP products?
    If this is the case, what version of SAP Solution Manager I need to create new system and generate solution key for SAP Netweaver 7.3? 
    Thanks for advices,
    KC

    Hi,
    Please follow the note [Note 1274430 - Installation of Solution Manager 7.0 Stack 18 and higher|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1274430]
    and the discussions here [Direct Upgrade from Solution Manager SP16 to SP26|Direct Upgrade from Solution Manager SP16 to SP26]
    Thanks,
    Jansi

Maybe you are looking for

  • How do I remove a previously purchased song from iPhone music

    I have removed the song from my iTunes purchased list on my mac, however it still shows up in my songs list on my iPhone withthe down load cloud icon. It still plays as if in the library when connected. There =does not seem to be a way to remove it.

  • Import photos from cd

    I am trying to import a group of photos to iphoto 11 from a cd.  I have tried the click and drag method and have tried File/Import to Library and nothing happens either time.  Am I doing something wrong? Thank you for any help!

  • ORACLE WINDOW 64 BIT ASM INSTALLATION

    Hello DBA's I have window's 7 64 Bit and i m installing oracle10g 64Bit Enterpeise edition Problem:- When i run Universal installer and choose ASM:- It asks me download and configure Grid infrastructure.. Please provide me the link from where i can d

  • Menu background audio stops when entering transition

    Is there anyway for the menu audio to overlap a transition towards the timeline ? I have a menu setup with audio and a still frame from a small movie as background, when hitting play all the menu play's the movie clip/transition which fades out and t

  • Wifi Connection Lost

    Since I updated to Lion OS X, almost all the times I start a longer download, safari looses the internet conection and the download is interrupted. I can't download anything tht requires more than 15 minutes of conection. How can I fix it?