2 Replies Latest reply on Jul 24, 2012 10:10 AM by zerayaqob

    NotifySqlTable and access to message header/metadata.

    zerayaqob Newbie

      Hi all,

       

      I am working on a problem that involves retreiving a file from an ftp server and pushing it to another ftp server. I wanted to log this process in a database and have managed to get to to work for text files... The problem is I really don't want to save the whole file in the database for the purpose of logging, just the file name will do. Is there a way to access the file name information from the NotifySqlTable notifier? If not, is there another way to do the logging while still making sure that the transfer has taken place?  And finally, is there a way to assign a variable name (hopefully  based on the file name) for the NotifyFtp property  'filename'? 

       

      Thanks.

      Below is my notifier action.

       

       

       

      <action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">

      <property name="okMethod" value="notifyOK" />

      <property name="notification-details">

      <NotificationList type="ok">

      <target class="NotifyFTP">

      <ftp URL="sftp://user:password@$server" filename="file.xxx" />

      </target>

      <target class="NotifySqlTable" driver-class="com.mysql.jdbc.Driver"

      connection-url="jdbc:mysql://localhost:3306/jboss" user-name="jboss"

      password="jboss" table="service_log" dataColumn="payload">

      <column name="status" value="success" />

      </target>

      </NotificationList> 

      <NotificationList type="err">

      <target class="NotifySqlTable" driver-class="com.mysql.jdbc.Driver"

      connection-url="jdbc:mysql://localhost:3306//jboss" user-name="jboss"

      password="jboss" table="service_log" dataColumn="payload">

      <column name="status" value="error" />

      </target>

      </NotificationList>          

      </property>

      </action>