[jboss-user] [EJB 3.0] New message: "Re: How create table from bean?"

Wolfgang Knauf do-not-reply at jboss.com
Mon Jan 11 05:43:38 EST 2010


User development,

A new message was posted in the thread "How create table from bean?":

http://community.jboss.org/message/519205#519205

Author  : Wolfgang Knauf
Profile : http://community.jboss.org/people/WolfgangKnauf

Message:
--------------------------------------------------------------
Hi,
 
the check for existence of a table can be performed by executing a SQL query. The query depends on your DBMS. For e.g. Oracle, this might be:
 
select count(*) from all_tables where owner = 'ME' and table_name = 'MY_TABLE';
 
 
The table could be created by executing a simple "create table" statement. But I think you have to provide more details on your use case: why does a bean have to create a table for another bean?
Also keep in mind that in a production environment, the app should not have the rights to do DDL.
 
Hope this helps
 
Wolfgang

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/519205#519205




More information about the jboss-user mailing list