DocumentStore
by Nicklas Karlsson
Actually this could be something for the seam-dev-list but I assume
that most of them are over here, too and this discussion could be view
from a general "portable extension"-point of view
Anyway, I started to look at porting the Seam Excel module and it's
content delivery mechanism, the stuff in org.jboss.seam.document
(namely, the DocumentStore). I assume a general DocumentStore
extension would be a natural candidate for a CDI extension, yes?
I don't know the history and evolution of the code and most stuff is
probably there for a reason but as I see it, the action is split up in
a Servlet part and a PhaseListener part (for redirects?). Some
questions:
1) Given Servlet 3, JSF 2 and CDI, Is there something in this
architecture that can be simplified? I assume we still can't just dump
the data to the response stream and be done with it?
2) Assuming the redirect is still needed, could we have a
self-registering Servlet 3- style DocumentServlet that would be
available just by dropping in the JAR? And the usage from an JSF
action would be something like
@Inject DocumentStore documentStore;
Document document = documentStore.getDocument();
document.setData(myByteArray);
document.setName("myfile.pdf");
document.setMimeType("application/pdf");
document.show(); // does the redirect;
There could of course be shorthands as
documentStore.PDFDocument.of(myByteArray).show();
And the DocumentServlet would then access the same (conversation
scoped) DocumentStore and deliver the data to the response stream
or perhaps DocumentServlet could have a factory for Document and you
would just do
@Inject Document document;
document.PDFof(myByteArray).show(); // sets mime type etc and redirects
3) Haven't looked at REST-stuff that much, could a DocumentServlet
like this also be used for permanent document delivery with fixed
paths, something like http://localhost/app/documents/secrets/1234 ?
--
---
Nik
15 years, 1 month
weld SE numberguess example ref doc bug (minor)
by Matt Drees
Hi,
Maybe it's too late for 1.0 (I see the tag was made already), but the
reference document for the Java SE numberguess example has an incorrect
sentence:
"Note that it
cannot use <literal>manager.getInstanceByType(Integer.class, new
AnnotationLiteral<Random>(){})</literal>
as the JSF example does because there will not be any active
contexts like there is during a JSF request."
However, the JSF numberguess example doesn't use
manager.getInstanceByType(), but instead uses Instance.get().
I'm sending an email instead of creating a jira issue since the public
release seems impending, and I'm not sure a jira issue creation would get
noticed in time.
-Matt
15 years, 1 month
About TCK
by Gurkan Erdogdu
Hi
I am trying to run TCK in an embeddable OpenEJB in Tomcat. AFAIK, test-harness deploys test archives that contain web.xml.
How to change/update this web.xml content to add our configuration specific parameters for example: listeners, servlets etc... ?
Thanks;
--Gurkan
15 years, 1 month
TCK is frozen
by Pete Muir
Please hold commits to the TCK for the 1.0.0 release.
15 years, 1 month