This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Feb 21, 2011, 2:55 PM
9 Posts

Re: Get resource (XPage) of the database from Java Agent

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: xpage,java agent,resource
  • Replies: 4
 Part of the problem is that the Agent Manager is going to use a different ClassLoader than the XPages servlet itself. So a lot of the no-effort capabilities provided by XPages aren't yet available in Agents. In this particular case, to get the same behavior, you would need to import the entire NotesFileSystem plugin to your agent. This could prove... daunting.
 
However, a much simpler solution would be to use DXL from the Agent content. You can build a NoteCollection that includes your XPage resource fairly easily, and when you export it via DXL to a stream, you'll have an XML block containing the  base64-encoded XSP source as a file attachment. I believe it's in the $FileData item. Extract this content, base64-decode it, and you should have your original XSP markup.
 
Otherwise, if you want to go with the ResourceAsStream route, you're going to have to do a lot of reverse engineering on the plugin JARs that make up the XPages runtime so you can include them in your Agent. It will take a while. 
 
You might also want to try the XAgent approach, as documented by Stephan Wissel. Google is your friend to find that one. 
Feb 22, 2011, 2:26 PM
3 Posts
Re: Get resource (XPage) of the database from Java Agent
Thank you. I'll try to do something.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal