Skip to main content

Posts

Showing posts with the label java

Java content Repository API

Jackrabbit an implementation JSR170 (JCR) http://jackrabbit.apache.org/jackrabbit-architectu re.html Detail article about JCR and jackrabbit. http://onjava.com/pub/a/onjava/2006/10/04/what-is- java-content-repository.html?page= 1

Create Thread Pool in JAVA is Easy now

By using ExecutorService we can create a pool of threads and run in parallel. This feature has introduced in JAVA5. see the below links. ExecutorService ThreadPoolExecutor here is an example: ExecutorService exec = Executors.newFixedThreadPool(10); for (int i=0;i exec.execute(new DoSomething(data)); } in this example we have created a pool of threads contains 10. Here new DoSomething(data) will be executed 10times parallel. this can be used, where we need to call Web services since we cannot create webservice connection pool.

Develope & deploy, debug JSR168 portlet with netbeans

As we know netbeans have portalpack plug in to develop JSR168 & 286 portlets. But we need portlet container to deploy & debug portlets. GateIn give a simple portlet container where we can test our portlets. To download click here Followed the below steps: Install portalpack plugin in netbeans Download and unzip GateIn Portlet Container Add new server(Tomcat) in netbeans as Unzipped folder like E:\jeeva\gatein-portletcontainer-2.1.0-Beta01-tomcat6 Create new web application and select Portlet support in netbeans For our webapp select server as created one. Develop portlet and deploy. this will deploy our app as normal webapp deployment in tomcat The GateIn Portlet Container will read this app and register with the container. Add the portlet in demo JSP of GateIn Portlet Container's simple-portal Access the url http://localhost:8080/simple-portal/demo/demo.jsp To debug our app start the server in debug mode from netbeans. So we can easily develop, deploy & debug our JSR p...