This looks like a hack to me.  Should we consider adding a schema-name 
element to the table configuration?  By this I mean that where ever we 
have table-name in the jbosscmp-jdbc.xml file we can have an optional 
schema-name element.  Also in the getTables call in we would pass the 
schema name as the second argument.

Does this make since?

Does anyone else have an opinion on this?

-dain

[EMAIL PROTECTED] wrote:

> Maybe you could take only the last period delimited token (meaning in

> MYSCHEMA.MYTABLE use MYTABLE) as the tablename when you must be using

> only a table name, not a qualified tablename.   I would expect that

> most RDBMS products, open or closed source, use this convention of "."

> delimiting tokens in table and column names.
> 
> Cheers
> 
> 
>>From: Dain Sundstrom <[EMAIL PROTECTED]>
>>Date: 2002/04/15 Mon AM 10:40:32 EDT
>>To: [EMAIL PROTECTED]
>>Subject: Re: [JBoss-dev] Problem in JDBCStartCommand.java
>>
>>JL@esial wrote:
>>
>>
>>>Hello,
>>>
>>>I am using JBoss 3.0.0beta2(200204150942) on Win2k SP2.
>>>The function tableExists in this class makes the following jdbc call:
>>>rs = dmd.getTables(con.getCatalog(), null, tableName, null);
>>>
>>>I am using DB2 as dbms, and this piece of code will not work if 
>>>
>>>tableName contains a prefix. 
>>>
>>
>>Why would it have a prefix?
>>
>>
>>>Indeed, I have to configure my 
>>>
>>>jbosscmp-jdbc.xml ejb/table mappings like that:
>>><table-name>MYSCHEMA.MYTABLE</table-name> 
>>>to get the SQL statements work properly with DB2. But then the 
>>>
>>>tableExists method will always return false since it takes 
>>>
>>>MYSCHEMA.MYTABLE as tableName.
>>>
>>
>>JBossCMP tries it's best to autogenerate tables, but it can not solve 
>>all problems.  I shoot for 80%.  If you need an exact mapping, you will 
>>have to create the tables by hand (you should also do this before 
>>sending the application to production).
>>
>>If you have a *SIMPLE* solution that works on all of the major 
>>commercial and all opensource DBs, then I am open to the suggestion/ patch.
>>
>>
>>
>>>Is there an easy way to set a tablename prefix or even a schema
>>>
>>>name in jbosscmp-jdbc.xml ? Right now, I think I will have to 
>>>
>>>patch my own code, but I believe many people out there using 
>>>
>>>DB2 or Oracle might encounter the same problem.
>>>
>>I don't think others have this problem, as you are the first to report 
>>it as a problem.
>>
>>-dain
>>
>>
>>_______________________________________________
>>Jboss-development mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-development
>>
>>



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to