[Design of POJO Server] - Re: Deployment through the ProfileService api
by scott.stark@jboss.org
"charles.crouch(a)jboss.com" wrote : I just wanted to make sure I've got the right idea about the steps to deploy something which doesnt have an associated DeploymentUnit, e.g. no underlying -ds.xml, using the ProfileService apis:
|
|
| a) From the ProfileService you call getProfile(ProfileKey key, String version). As we discussed on todays call the notion of version is going away, right?
|
Correct.
"charles.crouch(a)jboss.com" wrote :
| b) On the returned Profile you call getTemplate(String name). This name argument sounds like something for which there should be a definition around, e.g. static list of supported names?
|
| c) On the returned DeploymentTemplate call expand(Set values). Is Set<org.jboss.profileservice.spi.PropertyInfo> going to get replaced with Set<org.jboss.managed.api.ManagedProperty> or better yet just org.jboss.managed.api.ManagedObject? If so, thats another piece that requires a snapshot of jboss-managed.jar. Somehow expand() is also going to have to set the name attribute on the DeploymentContext it returns.
|
That is one way, but its not hooked up yet, and it needs to be synched up with the changes in the managed object api. The notion of a DeploymentTemplate was to create a deployment with preconfigured values coming from manged objects. We also need to actually create the templates.
"charles.crouch(a)jboss.com" wrote :
| d) On the Profile call addDeployment(DeploymentContext d) passing in the DeploymentContext returned from expand().
|
| e) If the deployment fails an exception of some variety is thrown.
|
|
Correct. However, for the initial tests I expect that the base deployment exists, so the way to add a deployment to a profile is:
| URL deploymentURL = ...
| VFS vfs = VFS.getVFS(deploymentURL);
| VirtualFile deploymentVF = vfs.getRoot();
| AbstractDeploymentContext context = new AbstractDeploymentContext(deploymentVF);
| ps.addDeployment(context);
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995976#3995976
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995976
18 years
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Correct XA behaviour on closing a connection
by jeffdelong
I seem to recall having a similar issue using the WebSphere 5.1 Embedded JMS Server. It has been about 3 years or more so I am not crystal clear on all the details. I has a stateless session bean that I used to send JMS messages from a third party process engine as part of a global transaction. I needed to close the session after each message was sent because the WebSphere Embedded JMS Server was not thread safe, i.e. if one thread sent a message on the same session as a second message on another thread, the JMS server might get confused and throw an exception. But when I closed the session in the finally clause, the message did not get sent, because the transaction had not been commited.
The solution in this case was to make the JMS session an instance variable and close it the next time the session bean method was invoked, and then create a new session each time.
I guess my point is the "Jo dumb user" may need to close the session, to conserve resources or some other reason but has little control / knowledge of when the global transaction is going to commit.
jBPM and hibernate have a similar issue. jBPM would typically tell hibernate to close the hibernate session when the jbpmContext is closed. Fortunately jbpm has a configuration option that can turn off this behavior in a managed environment. HIbernate also has configuration options to auto close session after transaction commits.
It might be nice if there were a JMS server configuration option to say 'defer closing sessions until transaction commits' or something similar. That way the choice can be specified by the user, although I would vote to make this the default, since I think that most often with a user closes the session, they still expect the message to be sent.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995959#3995959
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995959
18 years
[Design of POJO Server] - Deployment through the ProfileService api
by charles.crouch@jboss.com
I just wanted to make sure I've got the right idea about the steps to deploy something which doesnt have an associated DeploymentUnit, e.g. no underlying -ds.xml, using the ProfileService apis:
a) From the ProfileService you call getProfile(ProfileKey key, String version). As we discussed on todays call the notion of version is going away, right?
b) On the returned Profile you call getTemplate(String name). This name argument sounds like something for which there should be a definition around, e.g. static list of supported names?
c) On the returned DeploymentTemplate call expand(Set values). Is Set<org.jboss.profileservice.spi.PropertyInfo> going to get replaced with Set<org.jboss.managed.api.ManagedProperty> or better yet just org.jboss.managed.api.ManagedObject? If so, thats another piece that requires a snapshot of jboss-managed.jar. Somehow expand() is also going to have to set the name attribute on the DeploymentContext it returns.
d) On the Profile call addDeployment(DeploymentContext d) passing in the DeploymentContext returned from expand().
e) If the deployment fails an exception of some variety is thrown.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995936#3995936
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995936
18 years