Hi,
 
I'm trying to get the CoreSession from within an event listener that is 
triggered by the scheduler.

If I try to do it with the event.getContext().getCoreSession(); call it is null.

I'm currently doing it with the following call:

cs = new DocumentManagerBusinessDelegate().getDocumentManager(new 
RepositoryLocation("default"));

Is this the right way to do it?

Here is my scheduler config

<?xml version="1.0"?>

<component name="com.test.scheduler">
  <extension
    
target="org.nuxeo.ecm.platform.scheduler.core.service.SchedulerRegistryService" 
point="schedule">
        <schedule id="publication_scheduler">
          <username>Administrator</username>
          <password>Administrator</password>
          <eventId>schedulerEvent</eventId>
          <eventCategory>default</eventCategory>
          <cronExpression>0 1 * * * ?</cronExpression>
        </schedule>
  </extension>
</component>

Here is the scheduled event listener excerpt :

        <extension target="org.nuxeo.ecm.core.event.EventServiceComponent"
                point="listener">

                <listener name="scheduler_event" async="false" 
postCommit="false"
                        
class="com.base2.ecm.just.listeners.ScheduledEventListener">
                </listener>
        </extension>

Any suggestions?
--
Posted by "mark" at Nuxeo Discussions <http://nuxeo.org/discussions>
View the complete thread: 
<http://www.nuxeo.org/discussions/thread.jspa?threadID=2644#7458>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to