ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Lu <z...@umich.edu>
Subject Re: lock
Date Fri, 24 Jun 2005 14:17:16 GMT
It worked. Thanks for your help. Based upon your experience, do you know 
if this works for "create table" and "Create view"?

-Henry

Ron Grabowski wrote:

>The code I posted was just an example. I'm more familiar with the .Net
>version of iBATIS. I've attached a more complete example below. 
>
>I have not tested the code so if you copy and paste it into your
>application it will most likley not work. Make sure you replace
>"sqlMapconfig.xml" with the proper path to your config file:
>
>// untested - for example purposes only
>Reader reader = new Resources.getResourceAsReader("sqlMapconfig.xml");
>SqlMapClient sqlMap = SqlMapClientBuilder.buildSqlMap(reader);
>sqlMap.update("lockTable", null);
>
>Another way to go about solving this issue is to create a generic
>statement that executes sql statements:
>
> <statement id="executeRawSql">
>  $sql$
> </statement>
>
>That could be called like this:
>
> // untested - for example purposes only
> sqlMap.update("executeRawSql", "lock table x in shared mode");
>
>The sqlMap object in my last example is of type SqlMapClient and can be
>found in the com.ibatis.sqlmap.client package.
>
>- Ron
>
>--- Henry Lu <zhlu@umich.edu> wrote:
>
>  
>
>>What is the class of
>>
>>sqlMapper
>>
>>?
>>
>>-Henry
>>
>>
>>
>>Ron Grabowski wrote:
>>
>>    
>>
>>>Have you tried Larry's suggestion?
>>>
>>>sqlMapper.executeUpdate("lockTable");
>>>
>>><statement id="lockTable">
>>> lock table x in shared mode
>>></statement>
>>>
>>>--- Henry Lu <zhlu@umich.edu> wrote:
>>>
>>> 
>>>
>>>      
>>>
>>>>Mr. Ruth, thank you very much for your info for me to understanding
>>>>this 
>>>>group. I thought there is a group of expertise watching the emails
>>>>and 
>>>>helping people to use the iBATIS. So there are no iBATIS board
>>>>members 
>>>>in the group. Everyone is trying and error to figure out how to use
>>>>        
>>>>
>>>>iBATIS. If it works, fine, if it doesn’t, trying another way. You
>>>>never 
>>>>know what the best/right way to do it. One suggestion I’d like to
>>>>make 
>>>>to the board of iBATIS if I could is to write a better
>>>>        
>>>>
>>documentation
>>    
>>
>>>>so 
>>>>it will save users times.
>>>>
>>>>Thanks you again for you help.
>>>>
>>>>-Henry
>>>>
>>>>
>>>>
>>>>Brice Ruth wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Hi Henry,
>>>>>
>>>>>Please stay civil on this list. Throwing veiled insults at regular
>>>>>contributors on this list is not cool.
>>>>>
>>>>>This is not paid technical support that you're talking to. If
>>>>>          
>>>>>
>>that's
>>    
>>
>>>>>how you treat them, that's fine. We're all volunteers & users of
>>>>>iBATIS, as such, we subscribe to the notion of trying things out,
>>>>>seeing if they work. Sometimes, we're pleasantly surprised.
>>>>>
>>>>>In your particular case, since you haven't posted any errors from
>>>>>iBATIS, it appears that you haven't tried anything out. As such,
>>>>>          
>>>>>
>>the
>>    
>>
>>>>>best we can do is suggest that you do try. If you have particular
>>>>>problems, as a group, we can try to help straighten them out, or
>>>>>suggest addl. features for future releases.
>>>>>
>>>>>Nobody is going to try things out for you, though - that's your
>>>>>responsibility, as it should be.
>>>>>
>>>>>Best,
>>>>>Brice
>>>>>
>>>>>
>>>>>On 6/23/05, Henry Lu <zhlu@umich.edu> wrote:
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>Please don't answer the question that you don't know because it
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>will
>>>>   
>>>>
>>>>        
>>>>
>>>>>>wast both side time.
>>>>>>
>>>>>>-Henry
>>>>>>
>>>>>>Larry Meadors wrote:
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>DDL is not supported, but may work as an update.
>>>>>>>
>>>>>>>Larry
>>>>>>>
>>>>>>>
>>>>>>>On 6/23/05, Henry Lu <zhlu@umich.edu> wrote:
>>>>>>>
>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>treat as ddl.
>>>>>>>>
>>>>>>>>-Henry
>>>>>>>>
>>>>>>>>Larry Meadors wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>      
>>>>>>>>
>>>>>>>>           
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>>>How would you do it with JDBC?
>>>>>>>>>
>>>>>>>>>On 6/23/05, Henry Lu <zhlu@umich.edu> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>        
>>>>>>>>>
>>>>>>>>>             
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>How do i set sqlmap for the following SQL statement:
>>>>>>>>>>
>>>>>>>>>>lock table x in shared mode
>>>>>>>>>>
>>>>>>>>>>?
>>>>>>>>>>
>>>>>>>>>>-Henry
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>          
>>>>>>>>>>
>>>>>>>>>>               
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>        
>>>>>>>>>
>>>>>>>>>             
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>    
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>
>>> 
>>>
>>>      
>>>
>
>
>
>  
>

Mime
View raw message