[Management, JMX/JBoss] - Re: Managing JBoss programmatically?
by PeterJ
Two possibilities that I can think of.
1) Because your code is running within the server, you can always look up the name of the deploy directory and then copy the resulting EJB jar file to that directory and let the hot deployer pick it up on the next scan. You can determine the deploy directory name by either getting the jboss.server.base.dir system property and adding 'deploy' to it, or by getting the URLs attribute of the jboss.deployment:type=DeploymentScanner,flavor=URL MBean. To undeploy the JAR you would have to delete it.
2) You could simply create the EJB jar anywhere and then use the deploy() method on the jboss.system:service=MainDeployer MBean to deploy the JAR file where it is. You can call undeploy() on the same MBean to undeploy it.
With method 1, the EJB JAR is redeployed if you restart the server, but with method 2 the EJB jAR is not redeployed on a restart.
If I understand you correctly, the JAR files are custom built, generated on the fly, and possibly used only once. In that case, I would opt for option 2.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071253#4071253
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071253
18Â years, 8Â months
[JBoss Seam] - More complex request Processing. Does it work with seam?
by hexxter
Hello Forum,
I'm currently developing a web-app which will run under different domains and should behave and display differently there. Right now I'm using a combination of servlet/jsp but since I had an encounter with hibernate (which is really really great work) I thought I could give the framework from the same people a try.
What the app currently does:
1. (ContextBuilder) every request is piped through a servlet which builds a MyContext (domain/language/...) and then continues to
2. (Dispatcher) call -- depending on the MyContext and the request uri -- a fitting jsp page via the JspServlet.
3. The JspServlet renders the Page until it reaches something like:
<% Renderable r = Factry.getRenderable( "xyz" ); r.render( context, ... ) %>
(The "Renderable" object would be sth like an EntityBeans + the render Method. e.g. Person, Article, Xyz, ...)
Ok. Now to the interessting part:
4. (AreaRendering) depending on the MyContext and additional Parameters it chooses a renderable-xyz.jsp where the request is dispatched to again. The process of choosing the exact template.jsp is what all this is about since there are many parameters which I take into account: Language, domain, page, place, position in lists, user, type of rendarable and so on.
In addition this jsp is passed a reference to r as attribute 'self'. So there I use sth. like: <% Xyz self = request.getAttribute( 'self' );%><%=self.getName();%> or more complex operations on the entity. The process can go on from there unlimited.
So, why do I do it this way? It provides me with the maximum of configuration option which I need in this case. I can start a new Web simply by registering a new domain (and some little configuration) and then tell the application in a config file to:
* Render that component in this domain in another way or
* Call this other page when users are logged in or
* Use the English components for the .com domains
* Display the first entry of a list big and the rest of the list small
* many many more all by configuration.
Ok. Now to the real querstion: As I understand it seam depends on jsf which in turn has its own Servlet. There will be some processing and the jsf request queue seems pretty long. Is it possible to change my concept so that it works with seam? Can I chain jsf requests like I do with jsp an seam still works? Or is there a jsf mechanism I missed which can do what I want right out of the box?
Best regards & looking forward to answers
Florian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071251#4071251
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071251
18Â years, 8Â months