Monday October 12, 2009
Oracle Open World 2009 - Day 2 Report
Content available at: http://blog.arungupta.me/2009/10/oracle-open-world-2009-day-2-report/.
Posted by Arun Gupta in General | Comments[3]
|
|
|
|
|
Sunday October 11, 2009
Oracle Open World 2009 - Day 1 Report
Content available at: http://blog.arungupta.me/2009/10/oracle-open-world-2009-day-1-report/.
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Sunday October 04, 2009
Silicon Valley Code Code Camp 2009 Trip Report
Content available at: http://blog.arungupta.me/2009/10/silicon-valley-code-code-camp-2009-trip-report/.
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Tuesday September 15, 2009
TOTD #103: GlassFish v3 with different OSGi runtimes – Felix, Equinox, and Knoplerfish
Content available at http://blog.arungupta.me/2009/09/totd-103-glassfish-v3-with-different-osgi-runtimes-felix-equinox-and-knoplerfish/.
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Monday September 14, 2009
TOTD #102: Java EE 6 (Servlet 3.0 and EJB 3.1) wizards in Eclipse
Content available at http://blog.arungupta.me/2009/09/totd-102-java-ee-6-servlet-3-0-and-ejb-3-1-wizards-in-eclipse/.
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Wednesday September 02, 2009
Java EE 6, GlassFish, Eclipse, Dynamic Languages & Web Frameworks at Silicon Valley Code Camp 2009
Content available at: http://blog.arungupta.me/2009/09/java-ee-6-glassfish-eclipse-dynamic-languages-web-frameworks-at-silicon-valley-code-camp-2009/
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Monday August 31, 2009
TOTD #97 showed how to install GlassFish Tools Bundle for Eclipse 1.1. Basically there are two options - either install Eclipse 3.4.2 with WTP and pre-bundled/configured with GlassFish v2/v3, MySQL JDBC driver and other features. Or if you are using Eclipse 3.5, then you can install the plug-in separately and get most of the functionality.
TOTD #98 showed how to create a simple Metro/JAX-WS compliant Web service using that bundle and deploy on GlassFish.
This Tip Of The Day (TOTD) shows how to create a simple Java EE 6 application that reads data from a MySQL database using JPA 2.0 and Servlet 3.0 and display the results. A more formal support of Java EE 6/Servlet 3.0 is coming but in the meanwhile the approach mentioned below will work.
Lets get started!














@WebServlet(urlPatterns="/ServletClient")
public class ServletClient extends HttpServlet {
@PersistenceUnit
EntityManagerFactory factory;
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
ServletOutputStream out = resp.getOutputStream();
List list = factory.createEntityManager().createQuery("select f from Film f where f.title like 'GL%';").getResultList();
out.println("<html><table>");
for (Object film : list) {
out.print("<tr><td>" + ((Film)film).getTitle() + "</tr></td>");
}
out.println("</table></html>");
}
}
import java.io.IOException; import java.util.List; import javax.persistence.EntityManagerFactory; import javax.persistence.PersistenceUnit; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import model.Film;Basically, this is a Servlet 3.0 specification compliant Servlet that uses @WebServlet annotation. It uses @PersistenceUnit to inject the generated JPA Persistence Unit which is then used to query the database. The database query return all the movies whose title start with "GL" and the response is displayed in an HTML formatted table.


Simple, easy and clean!
How are you using Eclipse and GlassFish - the consolidated bundle or standalone Eclipse + GlassFish plugin ?
Download GlassFish Tools Bundle for Eclipse now.
Please send your questions and comments to users@glassfishplugins.dev.java.net.
Please leave suggestions on other TOTD that you’d like to see. A complete archive of all the tips is available here.
Technorati: glassfish eclipse mysql jpa database
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
|
Tuesday August 25, 2009
TOTD #98: Create a Metro JAX-WS Web service using GlassFish Tools Bundle for Eclipse
Now that you've installed GlassFish Tools Bundle for Eclipse 1.1, lets use this bundle to create a simple Metro/JAX-WS compliant Web service and deploy on GlassFish. These steps will work with either Eclipse 3.4.2 or 3.5 with WTP Java EE support.


public String sayHello(String name) {
return "Hello " + name + "!!";
}










Posted by Arun Gupta in webservices | Comments[3]
|
|
|
|
|
Friday August 21, 2009
TOTD #97: GlassFish Plugin with Eclipse 3.5
A new version of GlassFish Tools Bundle for Eclipse (ver 1.1) was recently
released. The build contains








Posted by Arun Gupta in General | Comments[2]
|
|
|
|
|
Wednesday July 08, 2009
Received a "certificate of attendance as speaker" for recently
concluded FISL 10.

This is sweet, thanks FISL organizers! It certainly adds a personal
touch to the whole experience.
I don't remember receiving a personal certificate like this :)
Technorati: conf
fisl brazil glassfish
netbeans
mysql
eclipse
Posted by Arun Gupta in General | Comments[3]
|
|
|
|
|
Tuesday June 30, 2009
FISL 2009 wrapped up over the weekend. Even though the
conference officially ended on Saturday but the connections made there
will certainly allow us to continue all the great momentum. The
conference celebrates open source and it was certainly great to see
Federal Government and Banks with their booths in the exhibitor halls.
The visit by Brazilian President Lula certainly highlights the
importance of this conference to the local community. There were booths
from Debian, Firefox, Ubuntu and other major open source softwares.
Some commercial vendors had a booth as well and of course Sun
Microsystems had a big presence with GlassFish,
Open Solaris, NetBeans, MySQL and other offerings.
I delivered 3 talks and participated in 1 talk show:

Wednesday June 24, 2009

I presented on "Creating
powerful web applications using GlassFish, MySQL and NetBeans/Eclipse"
as the first talk of FISL 10 yesterday. The room was only partial full
being the first talk of FISL but got packed towards the middle so that
was exciting. The slides are available here.
The key message is that NetBeans
and Eclipse
provide a seamless development/deployment environment for GlassFish.
The several demos shown in the talk are explained at:
Posted by Arun Gupta in General | Comments[7]
|
|
|
|
|
Wednesday June 17, 2009
GlassFish swimming to FISL, Brazil
![]() |
FISL stands for "Forum Internacional Software Livre" in
the Portuguese language and means "International Free Software Forum"
in the English language. The punch line is "A technologia que liberta"
and means "The technology that liberates". This is the biggest event about free software in America and was attended by 7417 participants in 2008. |

Posted by Arun Gupta in General | Comments[10]
|
|
|
|
|
Tuesday June 16, 2009
GlassFish at Eclipse Demo Camps Galileo 2009 - Jun 17th
![]() |
What is an Eclipse
Demo Camp ? The Eclipse DemoCamps are an opportunity to showcase all of the cool interesting technology being built by the Eclipse community. They are also an opportunity for you to meet Eclipse enthusiasts in your city. |
Posted by Arun Gupta in General | Comments[5]
|
|
|
|
|
Thursday May 21, 2009
TOTD #83: Eclipse Tools Bundle for GlassFish 1.0 - Now Available!
The GlassFish
Tools Bundle for Eclipse 1.0 is now available.

An earlier
blog entry explains how to get started using this bundle.
If you used an earlier version (0.99.x) of this bundle, then an upgrade
is not supported. However backwards compatibility will be maintained
going forward!
Here are some pointers to get you started:
Posted by Arun Gupta in General | Comments[3]
|
|
|
|
|
Today's Page Hits: 4196
Total # blog entries: 994
| « November 2009 | ||||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
1 | 2 | 4 | 6 | 7 | ||
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | |||||
| Today | ||||||