On 1/25/11 2:29 AM, Heiko Braun wrote:
On Jan 24, 2011, at 3:24 PM, Brian Stansberry wrote:
> The current detyped client side API[1] has no such stream-based method.
> With what it exposes, users would have to create operation requests
> using ModelNode, and either a) pass the content as a byte[] param in the
> operation request or b) pass a String param that represents a URL from
> which the server can read the content (URL must be accessible to the
> server).
>
> The simplest solution is just to add "byte[] addDeploymentContent(String
> name, String runtimeName, InputStream stream)" back into the client side
> API. That's what I'll do unless we reach a different decision in the
> next day or two.
I am wondering how you distinguish different content types though this API?
On the server side, the deployment content repository just reads the
stream and passes the same bytes to a FileOutputStream.
Or do assume it's always a ZipInputStream?
Yes; when the repository later hands out the content for use in the
runtime, it assumes it's a zip.
What reflects the file suffix? Is it something like
"runtimeName=*.war"?
Yes. The normal pattern is name = runtimeName = foo.war. If the user
wanted two different foo.war in the system, it could be, e.g.
name = foo.war_v1
runtimeName = foo.war
The "name" bit is only used as the unique id within the management
layer. The deployers and other runtime services only see the
runtimeName; e..g the becomes the JEE application name.
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat