Hi SenthilNathan,

some weeks ago i had the same problems. It seems that the ActivationCommand is 
not working with the Data Repository (Magnolia CE 4.5.2).
Workaround: You can implement you own logic in your modul class.

…
        public void start(ModuleLifecycleContext moduleLifecycleContext) {
                init(); 
        }       

        public void stop(ModuleLifecycleContext moduleLifecycleContext) {
                // log, cleanup
        }       
        
        public static CCMModul getInstance() {
                return Components.getSingleton(CCMModul.class);
        }       

        private void init() {

                Workspace workspace = null; 
                Session session;

                try {
                        session = MgnlContext.getJCRSession("data"); 
                        workspace = session.getWorkspace();
                } catch (LoginException e1) {
                        e1.printStackTrace();
                } catch (RepositoryException e1) { 
                        e1.printStackTrace();
                }

                if(workspace != null) {

                        
ObservationUtil.registerChangeListener(workspace.getName(), "/categories", new 
EventListener() {

                                public void onEvent(EventIterator events) {

                                        long timestamp = 0; 
                                        String alertPath = null;

                                        if(active) {
                                                while (events.hasNext()) {
                                                        Event event = (Event) 
events.next();

                                                        if(event.getType() == 
Event.NODE_ADDED) {
                                                                try {
                                                                        
                                                                        
alertPath = event.getPath();
                                                                        
timestamp = event.getDate();

…

Hope this helps,
Benni

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=5e576fb2-a445-4a54-b3ec-688063c9c34a


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to