what is the need & use of apache felix web console bundle in liferay 7.1 - apache-felix

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.

Related

Using Hawkular for Rest services built using CXF

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.

Adding a Groovy web console into eclipse(j2ee) and run it at apache tomcat

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.

Netbeans Web Service Client not found

I've always used eclipse before, but I'm using Netbeans for the first time because of it's integration with Web Service clients.
However, after following multiple tutorials, the way to add a web service client is to:
https://netbeans.org/kb/docs/websvc/flower_swing.html
Make a new project
Right click on your project, New->Other->Other->Web Service Client
However, I do not have the web service client option available, not sure what I am doing wrong.
Please mention the net beans version you have. You should use newer version of the IDE to use latest features.
For other developers who will face this problem like me, I will leave my answer here.
I'm currently using Apache NetBeans IDE 11.0 and it's in Web Services -> Web Service Client. If you still cannot find it, just use filter feature. I found it with filter.

Web framework with user-friendly desktop deployment?

I'm building a web app with Backbone.js (I'm not tied to Backbone yet though). I need a back-end framework only for persistence to a database via a RESTful API. However, I also need to able to deploy it as a 'desktop' app for off-line use, i.e. running a local server and launching a browser window, but I don't want users to have to start a server from the command line to run the application.
I can use SQLite as a database since it's only a single user application, it's just the framework that I'm stuck on. I have looked at the following:
Rails and Django: Default web servers are too flimsy, requires Ruby/Python and runs from the command line. I'm aware of the Bitnami stacks but at 99mb it's too big of a dependency and not exactly hidden from the user.
Sproutcore: Run from command line, also too bulky.
Pyjamas Desktop - Depends on MSHTML which I suspect limits my ability to use HTML5 features.
I'm leaning towards creating a Java app that starts a Scala/Lift server instance and opens a web browser, then sits in the system tray (kind of like WAMP). Is anyone familiar with a tool or framework built for user-friendly deployment as a standalone desktop app?
I do not know if PHP is an option for you? Then I would recommend phpdock.
web2py has a standalone deploy-to-desktop feature with no dependency on Python: http://web2py.com/books/default/chapter/29/14#How-to-distribute-your-applications-as-binaries
As Eydun said, phpdock is an option but it's commercially licensed .
I settled on using Java/Spring/H2/Hibernate/Jetty. I find that Jetty serves requests VERY quickly so the application looks real-time when launched in a browser. There is a tutorial on embedding the Jetty server here. I imagine it's quite trivial to build a GUI that launches the server and a browser.
Another Java option is to use the Play Framework, which may be more at home to those coming from a Django/Rails background. However, the documentation for "creating a standalone version of your application" for Play 2.0+ indicates that they have ditched using Java EE containers (Tomcat/Jetty) and WAR files in favor of running the JARs with the bundled copy of JBoss Netty, so it may take a bit of work to get it running the way you want it.
I would recommend the Play Framework approach if you're OK with using/learning Scala.

eclipse howto start a application client on java ee glassfish appl srv

i have installed the glassfish eclipse tools bundle...
i can start a project like dynamic web & a ear project and deploy them on the glassfish... it works perfect & under the localhost url i will get an hello world
but how i do this if i want to make an application client. please help...
at the moment i simply created an "app client project in eclipse" & added it to the same ear,
but i have no idea how to start this...
help - any tutorial how to start?!!
Not the only only answer to this question but the appclient approach mentioned in Jeff's answer is a viable approach, but I was able to execute a client using this mechanism in eclipse and I wanted to share that approach.
This approach will let you execute a java application with a main method acting as a client.
What you want to do is setup an External Tools Configuration.
Create a new Program type of external tool configuration.
Set location to point to the path of the appclient, for me
(using embedded glassfish eclipse plugin) it was [PATH TO ECLIPSE]\plugins\oracle.eclipse.runtime.glassfish_3.1.1.0\glassfish3\glassfish\bin\appclient.bat
Set working directory to your output/build directory e.g.
${project_loc}/target/classes
Set arguments to ${java_type_name}
Select the class in your project with a main method that you wish to run as the client app and then select your external tool from the run external tools menu.
There are two ways to do it. I'm afraid I can't be very specific, but I can point you in the right direction. (I'm just learning myself)
You can enable Web Start for the application client EAR in GlassFish. You can do this either in the deployment descriptor (so it's enabled every time you deploy) or you can go into the GlassFish admin console, navigate to the Application, and check the checkbox to enable it. I have made a little progress on this approach.
You can run it manually from the command line using, I believe, the "appclient" command. I have not been able to get this working yet.
Good luck, and if you learn more, I'd appreciate it if you let me know since I'm in the same boat as you.
Jeff