You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by ak...@eurosoftindia.com on 2003/04/17 11:39:28 UTC

how to expand a james.sar file

hi

i want to know how to expand a james.sar file

bye
akshay

> You have to expand the james.sar file and copy the contained JAR files
> (I needed all of them) into your classpath. I just wrote a tiny ANT
> task, like 'Take all jar files from the lib directory and compile my
> package and make it a jar file'.
>
> Stephan
>
> joni santoso wrote:
>
>> Hi,
>>
>> I downloaded these codes somewhere.
>>
>> I tried to compile them but javac couldn't find the org.apache.mailet.
>>  How to enable it?
>>
>> And what  do these codes do?
>>
>> Regards,
>>
>> import org.apache.mailet.*;
>>
>> public class SchedulingRequestMatcher extends GenericRecipientMatcher
>> {
>>
>>     public boolean matchRecipient(MailAddress recipient) {
>>         if (recipient.getUser().startsWith("request-available-")) {
>>             return true;
>>         }
>>         if (recipient.getUser().startsWith("request-unavailable-")) {
>>             return true;
>>         }
>>         return false;
>>     }
>>
>> }
>>
>> --------------------------
>>
>> import java.sql.*;
>> import java.util.*;
>> import javax.mail.*;
>>
>> import org.apache.mailet.*;
>>
>> //Avalon specific imports
>> import
>> org.apache.avalon.cornerstone.services.datasource.DataSourceSelector;
>> import org.apache.avalon.excalibur.datasource.DataSourceComponent;
>> import org.apache.james.Constants;
>> import org.apache.avalon.framework.component.ComponentManager;
>>
>> public class SchedulingRequestMailet extends GenericMailet {
>>
>>     protected DataSourceComponent datasource;
>>     protected DataSourceSelector datasources;
>>
>>     public void init() throws MessagingException {
>>         try {
>>             //Get a reference to the Avalon component manager
>>             ComponentManager componentManager =
>> (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
>>
>>
>>             // Get the list of possible data sources
>>             System.out.println("mailet: " + componentManager);
>>             datasources =
>> (DataSourceSelector)componentManager.lookup(DataSourceSelector.ROLE);
>>             // Get the data-source we need
>>             datasource =
>> (DataSourceComponent)datasources.select("maildb");
>>         } catch (Exception e) {
>>             throw new MessagingException("Error getting datasource",
>> e);
>>         }
>>     }
>>
>>     public void service(Mail mail) throws MessagingException {
>>         try {
>>             Collection recipients = mail.getRecipients();
>>             if (recipients.size() > 1) {
>>                 //Send error message to sender
>>                 return;
>>             }
>>             MailAddress recipient =
>> (MailAddress)recipients.iterator().next();
>>             //Determine whether the seller is available
>>             boolean sellerAvailable = recipient.getUser().
>>                startsWith("request-available-");
>>             //Determine the request ID in question
>>             String requestID = recipient.getUser();
>>             int pos = requestID.lastIndexOf("-");
>>             requestID = requestID.substring(pos + 1);
>>             //Get the seller's email address
>>             String sellerAddress = mail.getSender().toString();
>>
>>             Connection conn = datasource.getConnection();
>>             String sql = "UPDATE SellerRequest SET available = ? WHERE
>>
>> seller_email = ? AND request_id = ?";
>>             PreparedStatement stmt = conn.prepareStatement(sql);
>> stmt.setBoolean(1, sellerAvailable);
>>             stmt.setString(2, sellerAddress);
>>             stmt.setInt(3, Integer.parseInt(requestID));
>>             stmt.execute();
>>             stmt.close();
>>             conn.close();
>>             mail.setState(Mail.GHOST);
>>         } catch (SQLException sqle) {
>>             throw new MessagingException(sqle.toString());
>>         }
>>     }
>>
>> }
>> ===========================================================================================
>> "Sudahkah Anda mencoba PlasaMessenger, aplikasi chat yg bisa digunakan
>>  untuk bertukar file, download di http://im.plasa.com"
>> "Malas antri buat mendapatkan print-out tagihan telepon ? Klik aja
>> http://billinfo2.plasa.com"
>> ===========================================================================================
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org For
>> additional commands, e-mail: james-user-help@jakarta.apache.org
>>
>>
>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: how to expand a james.sar file

Posted by Miroslav Nachev <mi...@space-comm.com>.
   Hi,

   JAMES.SAR is an ZIP file which can be extracted with WinZIP,
WinRAR, etc.


   Best Regards,
   Miroslav Nachev



---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org