Is there anyway to use jberet as standalone module to execute Batch Jobs?
All the time getting samples on using along with WildFly.
Surprised to see it looks for container to load implementations while trying some samples.
Any insights on why/why not would be helpful
Here is a tutorial how to use jberet in a standalone application:
http://www.mastertheboss.com/batch-api/running-batch-jobs-in-j2se-applications
You'll need to include various jboss dependencies for it to work.
Furthermore you need to configure jberet with a separate jberet.properties.
I've build a (hopefully) minimal example application according to the tutorial.
You can find it here: https://github.com/kaape/jberet-standalone-example
More information can be found in the jberet github repository:
https://github.com/jberet
I created a similar example but uses JDBC chunk oriented processing. https://github.com/lbtc-xxx/jberet-se-example
JBeret project test-apps sub-module (https://github.com/jberet/jsr352/tree/master/test-apps) contains various test apps that are structured as standalone Java SE applications (except restAPI where WildFly appserver is needed).
For JBeret + WildFly samples, please check out JBeret project wildfly-jberet-samples module:
https://github.com/jberet/jsr352/tree/master/wildfly-jberet-samples
Related
I am new in liferay want to perform crud operation using service builder so i want to understand need & use of apache felix web console bundle in liferay 7.1 so that i use it in order to check json/webservice api.
I would say you are not looking at the right tool for the job.
The console enables you to interact with the OSGi framework, a good place to start is not on the console but on the file systems if you are looking into understanding how Liferay uses the framework. The framework is embedded into the web app in order to provide the environment where bundles can live and provide services collectively.
Gogo is an auxiliary tool that enables interaction, you can query if bundles are installed, check the dependencies that you missed and who is providing a certain service or exposing a package.
Most of day-to-day of this kind of information you can also find in the app manager and/or logs.
About testing you api, I assume you are looking for seeing if it was installed and if it was resolved and activated. The app managers can provide the first clue for this, but gogo is an adequate tool as well, you will need to learn its commands and syntax. Do not worry they are trivial, you can find a description on the Apache's project page an on Liferay's dev guide.
Now, if you are looking to test the API for correctives or availability, using gogo will demand custom commands and lots of extra logic other tools provide for you.
I am new to Distributed Tracing / Hawkular. And would like to experiment tracing for my distributed cxf rest services using hawkular.
Will it be possible to trace cxf servcies using hawkular and if any one has doc or reference sample app, that will be great.
Also, is there any other tracing tool which can solve this requirement(tracing java cxf rest services). Zipkin-brave has a feature for this which I am looking at also.
I'd recommend instrumenting your application using the OpenTracing API, and later choose a concrete implementation. Under the Hawkular project, there's the Hawkular APM module which provides a solution for capturing, visualizing and making sense of the data. However, we (Hawkular APM) recently decided to join the Jaeger project, to have a better support for the OpenTracing case. We expect to have similar features from Hawkular APM ported to Jaeger "soon".
For OpenTracing, there are quite a few "framework integrations" under the OpenTracing Contrib organization, including JAX-RS, which might serve as base or reference for a CXF-specific implementation. If nothing suits you, I'm certain we'd welcome a contribution.
If you are just looking to learn OpenTracing, I'd suggest taking a look at the Hawkular APM's example directory, including a vertx-opentracing example.
Is there anyone that has done a java interpreter using groovy-all jar file? Maybe sample or example can share it to me or teach me? I meant a interpreter that can parse string(java code) into the textarea and output it as a result like(hello world)
As you need some sample code to implement a web-console using groovy-all.jar, it would strongly recommend taking a look at Groovy Web Console.
Although it's not exactly a Java EE / Tomcat app and it is fairly similar as its a standard Java Servlets API 2.5 based web app. It runs on Google App Engine, which you can try out here. All you need from it is the script execution logic which for most of the part is not app engine specific. Keep in mind, it has dependencies on GAE Apis (through Gaelyk) so you should prune that part out of it to run in it outside Google App Engine.
As mentioned in the article https://community.jboss.org/wiki/DataSourceConfigurationInAS7 JBoss 7 provides 2 main ways to configure a data source.
What is the BEST practice of configuring a data source in JBoss 7 AS ? Is it
As a module?
As a deployment?
(The same question has been asked in the thread https://community.jboss.org/thread/198023, but no one has provided an acceptable answer yet.)
The guide JBoss AS7 DS configuration says the recommended way is to configure the datasource by deployment
But according to discussion on the link Jboss 7 DS configuration JBoss Community Discussion on page 54 of the guide it mentions that the recommended way to deploy JDBC driver is to use modular approach
But I personally say that the better(not the best) approach to configure JDBC driver would be to use modules because of 3 reasons
JDBC driver will generally not change.
Re-usability : You can use the same module across various applications and not deploy the jar along with each application, this prevents duplicacy
Space Effective : Using the module approach lets you reduce the size of your EAR/WAR as you do not need to supply the jar with the package
Hence I would argue that the better of the two approaches is via modules
#Mukul Goel
It's not necessary to include it the EAR of your application it's sufficient to put the .jar inside the deployments folder so:
no need to embed in ear
no need to create a module
Jist deploy in deployments folder or via admin console
We are performing some JMeter tests on a JBoss 4.0.5 deployed web app. We want to integrate the resource usage on the application on the server (memory, threads, etc) with the JMeter response time results.
We have found a tutorial for doing that with Tomcat: http://www.informit.com/guides/content.aspx?g=java&seqNum=273 and we want to know if it could be done with JBoss.
One alternative is doing resource usage monitoring by hand, using jconsole or something similar, but we prefer something automated and integrated.
Regards,
JBoss includes Tomcat, so yes. Instead of the /manager/status?XML=true URL path mentioned in the article, use /status?XML=true. That should be it.