cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: HSSFSerializer on away mission
Date Fri, 03 May 2002 13:08:30 GMT
> From: news [mailto:news@main.gmane.org] On Behalf Of Sven Kuenzler
> 
> Hi,
> 
> I need  to use the HSSFSerializer w/o Cocoon. I already had a look at
the
> ProcessingPipeline to figure out how to setup up a serializer
appropiately.
> At the moment, I get a NPE in getLogger().  So I guess I also have to
> provide an Avalon environment. Can somebody please give me a hint what
steps
> are required for a minimal Avalon setup for serializers?

Take a look into serializer and figure out for your self. Here is the
piece to help you started:


 
Hierarchy.getDefaultHierarchy().setDefaultPriority(Priority.INFO);
            Logger logger =
Hierarchy.getDefaultHierarchy().getLoggerFor("");

            StoreJanitorImpl janitor = new StoreJanitorImpl();
            janitor.setLogger(logger);
            janitor.configure(new DefaultConfiguration("", ""));

            DefaultComponentManager manager = new
DefaultComponentManager();
            manager.put(StoreJanitor.ROLE, janitor);
            manager.put(Store.PERSISTENT_CACHE, new MemoryStore());

            MRUMemoryStore one = new MRUMemoryStore();
            MyMRUMemoryStore two = new MyMRUMemoryStore();

            one.setLogger(logger);
            two.setLogger(logger);

            one.compose(manager);
            two.compose(manager);

            Parameters params = new Parameters();
            params.setParameter("maxobjects",
Integer.toString(maxObjects));
            params.setParameter("use-persistent-cache", "false");

            one.parameterize(params);
            two.parameterize(params);

Here created MRUMemoryStore and supplied with all the necessary stuff.

Regards,
Vadim

> 
>     Thanks, Sven....


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message