Hi all,
I'm using a peace of code from RemoteDelivery in my mailet:

ComponentManager compMgr = 
(ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
                String outgoingPath = getInitParameter("outgoing");
                if (outgoingPath == null) {
                        outgoingPath = "file:///../var/mail/outgoing";
                }

                try {
                        // Instantiate the a MailRepository for outgoing mails
                        MailStore mailstore = (MailStore) 
compMgr.lookup("org.apache.james.services.MailStore");

                        DefaultConfiguration spoolConf
                                = new DefaultConfiguration("repository", 
"generated:RemoteDelivery.java");
                        spoolConf.setAttribute("destinationURL", outgoingPath);
                        spoolConf.setAttribute("type", "SPOOL");
                        outgoing = (SpoolRepository) mailstore.select(spoolConf);
                } catch (ComponentException cnfe) {
                        log("Failed to retrieve Store component:" + cnfe.getMessage());
                } catch (Exception e) {
                        log("Failed to retrieve Store component:" + e.getMessage());
                }


I take the folloing errors by compiling:
compile:
    [javac] Compiling 1 source file to C:\eclipse\workspace\SMS Push Connector\build
    [javac] C:\eclipse\workspace\SMS Push 
Connector\src\com\sayrix\smspc\SMSPCMailet.java:84: cannot access 
org.apache.avalon.cornerstone.services.store.Store
    [javac] file org\apache\avalon\cornerstone\services\store\Store.class not found
    [javac]                     MailStore mailstore = (MailStore) 
compMgr.lookup("org.apache.james.services.MailStore");
    [javac]                                               ^
    [javac] C:\eclipse\workspace\SMS Push 
Connector\src\com\sayrix\smspc\SMSPCMailet.java:90: cannot resolve symbol
    [javac] symbol  : method select 
(org.apache.avalon.framework.configuration.DefaultConfiguration)
    [javac] location: interface org.apache.james.services.MailStore
    [javac]                     outgoing = (SpoolRepository) 
mailstore.select(spoolConf);
    [javac]                                                               ^
    [javac] Note: C:\eclipse\workspace\SMS Push 
Connector\src\com\sayrix\smspc\SMSPCMailet.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -deprecation for details.
    [javac] 2 errors

Question:
1) Can I ignore the warning "deprecatetd" and go ahead?
2) where I can find the package containing 
org\apache\avalon\cornerstone\services\store\Store.class?

Thanks!

--Angel 
             

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to