[Management, JMX/JBoss] - Connect with jconsole and where find simple jmx mbean exampl
by abdujaparov
Hi, I'm trying to connect to jmx of jboss through the jconsole. I've inserte in run.conf the following line:
| #
| # Specify options to pass to the Java VM.
| #
| if [ "x$JAVA_OPTS" = "x" ]; then
| JAVA_OPTS="-server -Xms128m -Xmx128m"
| fi
|
| # Enable the jconsole agent locally
| JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
|
| #
| # Specify options to pass to the Java VM.
| #
| if [ "x$JAVA_OPTS" = "x" ]; then
| JAVA_OPTS="-server -Xms128m -Xmx128m"
| fi
|
|
| # Enable the jconsole agent remotely on port 12345
| JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=12345"
| JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
| JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
|
When I launch jconsole in the tab local I cannot view anything and when I go to the tab remote and use like host localhost( or 127.0.0.1) and port 12345 and the I press connect jconsole tell me connection failed, why?
How can I resolve?
Another question I want to write a jmx mbean to calculate the response time of a web service. I've read something about jmx but I don't understand anything, where can I find a simple example of jmx mbean for jboss and how can I deploy it?
Thanks, bye bye.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107808#4107808
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107808
18 years, 5 months
[JBoss Seam] - generating forms programatically
by steshaw
Hi. I'm pretty new to Seam and JSF. I'm using it with Facelets and RichFaces/Ajax4j. I've been looking predominantly at the bookings demo as an example of how to get going. I noticed that in templates (I call all .xhtml Facelet files templates) defining forms there are a fair bit of boiler place with the instantiating of the "edit.xhtml" composition.
I'm wondering if you can programatically create a form. This way you can even build generic forms for domain objects in your app. This technique is used by users of the Click framework and also Tapestry. Tapestry 5 seems to have some specific support for it, calling it BeanEditForm.
Any hints about how to build a FormBuilder with Seam/JSF/Facelets/RichFaces or otherwise dealing with the boiler plate around form construction?
One of the features I am hoping to have with my FormBuilder is to notice when the form is read-only and use output fields instead of input boxes (i.e. build a "display page" rather than an "input form"). I'd also like to hide the boilerplate for adding decorators for required fields, validation and error messages. This way I can switch the entire app over from errors at the top to errors next to fields or decide globally whether to use ajax4j for validation onblur. This should help with maintenance problems as the project evolves.
Cheers,
Steve.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107799#4107799
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107799
18 years, 5 months
[JBoss Seam] - EntityQuery Bug with Group by and Restriction?
by terryb
I am not sure if, im doing it the wrong way or it's a bug.
I'm attempting aggregate query in using EntityQuery and Restrictions following Seam-Gen example. When query is executed, the 'restrictions's parameters get appended to Group By clause rather than Where clause. Please see attached query, and code.
Is there any other way of doing this?
| ...
|
| @Name("paymentReconciliation")
| public class PaymentReconciliation extends EntityQuery {
|
| private static final String[] RESTRICTIONS = {
|
| "commweb.settleDate >= #{paymentReconciliation.settlementDateFrom}",
| "commweb.settleDate <= #{paymentReconciliation.settlementDateTo}",
| };
|
| private Date settlementDateFrom = null;
| private Date settlementDateTo = null;
|
| private boolean executeSearch = false;
|
| @Override
| public String getEjbql() {
|
| return "select commweb.settleDate, " +
| "sum(CASE WHEN client.qtiscApplicantType=2 THEN 1 ELSE 0 END) as TotalAppsTee, " +
| "sum(CASE WHEN client.qtiscApplicantType=3 THEN 1 ELSE 0 END) as TotalAppsNonTee, " +
| "sum(CASE WHEN client.qtiscApplicantType=2 THEN commweb.amount ELSE 0 END) as TotalAmountTee, " +
| "sum(CASE WHEN client.qtiscApplicantType=3 THEN commweb.amount ELSE 0 END) as TotalAmountNonTee, " +
| "count(application.id) as TotalApps, " +
| "sum(commweb.amount) as TotalAmount " +
| "from Client client " +
| "join client.applications application " +
| "join application.ttransactions ttransaction " +
| "join ttransaction.commweb commweb " +
| "where ttransaction.paymentMethod='" + Constant.Application.PaymentMethod.ONLINE_CREDIT_CARD + "' " +
| "and commweb.status = 'approved' " +
| "group by commweb.settleDate " ;
|
| }
|
| ...
| Error
| Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: and near
| line 1, column 751
|
| ...
|
| Query Produced by Seam
| select commweb.settleDate,
| sum(CASE WHEN client.qtiscApplicantType=2 THEN 1 ELSE 0 END) as TotalApp
| sTee,
| sum(CASE WHEN client.qtiscApplicantType=3 THEN 1 ELSE 0 END) as TotalAppsNonTee,
| sum(CASE WHEN client.qtiscApplicantType=2 THEN commweb.amount ELSE 0 END) as TotalAmountTee,
| sum(CASE WHEN client.qtiscApplicantType=3 THEN commweb.amount ELSE 0 END) as TotalAmountNonTee,
| count(application.id) as TotalApps,
| sum(commweb.amount) as TotalAmount
|
| from au.edu.tisc.entity.Client client
| join client.applications application
| join application.ttransactions ttransaction
| join ttransaction.commweb commweb
|
| where ttransaction.paymentMethod='online-credit-card'
| and commweb.status = 'approved'
|
| group by commweb.settleDate
|
| and commweb.settleDate >= :el1 and commweb.settleDate <= :el2
|
| order by settleDate asc]
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107796#4107796
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107796
18 years, 5 months