List Info

Thread: ATLAS/AJAX with iBatis




ATLAS/AJAX with iBatis
user name
2006-10-12 19:22:24
I use Anthem for my .NET AJAX library (very very easy to use
with both ASP.Net 1.1 and 2.0):

 http://www.anthemdotnet.c
om

I don't think your problem is with your AJAX library. If you
are only updating a property on your Location object then
just send back the Location object to the database to be
updated. If you're looking for something to determine what
parts of a graph changed, you might want to look into
NHibernate/ActiveRecord:

h
ttp://www.castleproject.org/index.php/ActiveRecord

IBatisNet doesn't track object changes...that's up to the
application.

----- Original Message ----
From: Brian Kierstead <brianfluidmedia.com>
To: user-csibatis.apache.org
Sent: Thursday, October 12, 2006 1:38:16 PM
Subject: ATLAS/AJAX with iBatis

Hi everyone,

Is anyone using iBatis with ATLAS or other AJAX
technologies?  In our 
current project, under .Net 2.0, I'm using ATLAS on the
front-end to do 
in-place editing.

I'm using an architecture similar to that of the NPetShop
application - 
Web, Presentation, Service and Persistence, plus a Domain.  
I've also 
broken my pages down into user controls which are passed 
domain objects 
to show/return.  When a change is made to a field, it raises
an event 
which then bubbles up (maybe through a couple of user
controls) to the 
parent page.  The parent page contains the main object,
which is then 
saved to the database.

For example, I have a Drive which contains an Appointment
which contains 
a Location.  When I change the street address it of the
Location, it 
raises an event in Location, which raises an event in
Appointment, which 
raises and event in Drive.  Drive then persists itself to
the database 
via the other layers.

The problem is that while I'm saving the entire Drive object
(which also 
contains other objects, not just those I mentioned)  to the
database 
only 1 field has changed.  So every time a user updates a
field, I save 
a lot of data that hasn't changed.

I don't want persistence details in my front-end, so I don't
want the 
changed field to know which database field it corresponds
to.

Has anyone done this or have any suggestions about what to
do?

Thanks,
Brian




Log4net...
user name
2006-10-14 17:56:28
I copied and pasted configuration in the ibatis sqlmapper
document for 
logging but I didn't get anything in the log file about SQL
statements 
and IBATIS. I am using VS2005 .NET 2 and log4net for log.
What should i 
do to log all SQL statement in the log file? Should I call
some 
functions? objects? ...

-Henry
Log4net...
user name
2006-10-14 23:14:45
I have a similar setup to what you've described, so I've
included my
application config file below which is working.  this file
is named
the same as my application plus a .config on the end
(lwa.exe.config)
and lives in the same directory as the executable.  Make
sure you also
have references to log4net.dll and
IBatisNet.Common.Logging.Log4Net.dll in your project.. if
you don't
have the latter, silently nothing happens :

<?xml version="1.0" encoding="utf-8"
?>
<configuration>
    <configSections>
      <sectionGroup name="iBATIS">
       <section name="logging"
type="IBatisNet.Common.Logging.ConfigurationSectionHand
ler,
IBatisNet.Common" />
      </sectionGroup>
        <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler
, log4net" />
    </configSections>
     <appSettings>
      <add key="log4net.Internal.Debug"
value="false"/>
     </appSettings>
 <system.diagnostics>
 <trace autoflush="false">
   <listeners>
    <add name="textWriterTraceListener"
    
type="System.Diagnostics.TextWriterTraceListener"
    
initializeData="C:\inetpub\wwwroot\log4net.txt"
/>
   </listeners>
  </trace>
 </system.diagnostics>

<iBATIS>
 <logging>
  <logFactoryAdapter
type="IBatisNet.Common.Logging.Impl.Log4NetLoggerFA,
IBatisNet.Common.Logging.Log4Net">
   <arg key="configType"
value="inline" />
  </logFactoryAdapter>
 </logging>
</iBATIS>

    <log4net>
        <appender name="ConsoleAppender"
type="log4net.Appender.ConsoleAppender" >
            <layout
type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date
[%thread] %-5level
%logger - %message%newline" />
            </layout>
        </appender>

    <appender name="RollingFileAppender"
type="log4net.Appender.RollingFileAppender">
        <file value="lwa.log" />
        <appendToFile value="true" />
        <maximumFileSize value="100KB" />
        <maxSizeRollBackups value="5" />

        <layout
type="log4net.Layout.PatternLayout">
            <conversionPattern value="%date
[%thread] %-5level %logger
- %message%newline" />
        </layout>
    </appender>

        <root>
            <level value="DEBUG" />
            <appender-ref ref="ConsoleAppender"
/>
            <appender-ref
ref="RollingFileAppender" />
        </root>


          <logger
name="IBatisNet.DataMapper.Commands.DefaultPreparedComm
and">
           <level value="INFO" />
          </logger>
          <logger
name="IBatisNet.DataMapper.Configuration.Cache.CacheMod
el">
           <level value="INFO" />
          </logger>
          <logger
name="IBatisNet.DataMapper.LazyLoadList">
           <level value="INFO" />
          </logger>
          <logger
name="IBatisNet.DataMapper.SqlMapSession">
           <level value="INFO" />
          </logger>
          <logger
name="IBatisNet.Common.Transaction.TransactionScope&quo
t;>
           <level value="INFO" />
          </logger>
          <logger
name="IBatisNet.DataAccess.DaoSession">
           <level value="INFO" />
          </logger>
          <logger
name="IBatisNet.DataAccess.Configuration.DaoProxy"
>
           <level value="INFO" />
          </logger>
          <logger
name="IBatisNet.DataMapper.Configuration.Statements.Pre
paredStatementFactory">
           <level value="OFF" />
          </logger>
          <logger
name="IBatisNet.DataMapper.Commands.IPreparedCommand&qu
ot;>
           <level value="OFF" />
          </logger>

          <logger
name="anmar.SharpMimeTools.SharpMimeTools">
            <level value="DEBUG" />
          </logger>
          <logger
name="anmar.SharpMimeTools.SharpMimeMessage">
           <level value="DEBUG" />
          </logger>

    </log4net>
</configuration>

On 10/14/06, zhluumich.edu <zhluumich.edu> wrote:
> I copied and pasted configuration in the ibatis
sqlmapper document for
> logging but I didn't get anything in the log file about
SQL statements
> and IBATIS. I am using VS2005 .NET 2 and log4net for
log. What should i
> do to log all SQL statement in the log file? Should I
call some
> functions? objects? ...
>
> -Henry
>


-- 

---------------------------------------
Donald Dwoske
Software Journeyman
http://www.loraxis.com
/ddwoske
ibatis.net api doc
user name
2006-10-16 11:49:31
How and where do we get the ibatis.net api documentation
like java 
version or can be searched in the VS .NET 2005?

-Henry
ibatis.net api doc
user name
2006-10-16 16:43:00
You got them with the binaries.

On 10/16/06, Henry Lu <zhluumich.edu> wrote:
> How and where do we get the ibatis.net api
documentation like java
> version or can be searched in the VS .NET 2005?
>
> -Henry
>


-- 
Cheers,
Gilles

<a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE"
>Wish List</a>
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )