How can i use table view in EJB?

Discussions

EJB programming & troubleshooting: How can i use table view in EJB?

  1. How can i use table view in EJB? (4 messages)

    I need to use the view (instead of table from oracle), I tried using view in my CMP bean, but I am getting an error, it says "java.sql.SQLException: ORA-01733: virtual column not allowed here".

    Can anybody please tell me how to handle this?
  2. Not an expert but I think the problem with using views in general is that you can't do updates on them. I think Oracle does let you create updatable views. If your view can do crud then I don't see a problem, as it should be just like another table to the container/jdbc code.

    --
    Tinou Bao
    www.tinou.com
  3. How can i use table view in EJB?[ Go to top ]

    Hi there
    if u r using views with CMP
    u can only read the data update is not
    possible as Tinou said so u can read the data
    from multiple tables correct if i am worong ??
    Cheers

    Manoj
  4. Views are not fully supported by many releases of application servers and JDBC drivers, for the most part if the view is not updateable then it would not work no matter what the implementation. For example weblogic 5.1 does not fully support views and it would most likely not work. With EJB 2.0 there is support for multitable CMP, but each table has to have its own entity beans and you can kind of chain the entity beans together almost like a where clause. The best way to do multi table updates is to use session beans, you may be able to BMP although I have never done that since a session bean has less overhead and better performance.

    rich
  5. How can i use table view in EJB?[ Go to top ]

    Hi Rich
    again depaends if the data is participating in
    complex transaction then one must go for BMP in this
    case.SSession bean will be more help ful when only you need to retive junk of data.
    Manoj