> 1) You didn't specify whether you're using the "server" or the "client"

tapestry5-cayenne-server, 0.5-SNAPSHOT

> sense that the Request is null.  But that suggests the problem is in your
> code because neither implementation of ObjectContextProvider references 
> the Request service.

You're absolutely right. Your comment made me realize I'd made a stupid 
mistake: I used currentContext() instead of newContext(). *facepalm*
Then I gave up too easily because I couldn't get the source code attached in 
the eclipse debugger and I thought my startup method couldn't work anyway 
because ObjectContextProvider isn't eager loaded.

> Can you post the full code of, eg, the registerCayenneFilterAndListener
> method?

This is the code with newContext() instead of currentContext() and it seems to 
work now :)

@Startup
public void registerCayenneFilterAndListener(@Inject ObjectContextProvider 
provider) {
    DataContext dataContext = (DataContext) provider.newContext();
    dataContext.getEntityResolver().getCallbackRegistry().addListener(new 
LastModifiedListener());
    dataContext.getParentDataDomain().addFilter(new ChangeSetFilter());
}

The @Inject isn't even necessary? 
This also works:
public void registerCayenneFilterAndListener(ObjectContextProvider provider) ...

Thank you for your comment.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to