| Subcribe via RSS

Tutorial : Java stand alone application calls EJBs

March 30th, 2008 | No Comments | Posted in Java

After the tutorial about MyJava, I have created this topic for remembering my EJB. Actually, we have to create Servlet and deploy to the J2EE container, so the Servlet can find the EJB. However, if you want to use stand alone application to call the EJB. The PROVIDER_URL should be defined, hence the application can connect to the EJB. If we didn’t define the PROVIDER_URL in application, the application won’t find the EJB name on JNDI.

CODE
Hashtable env = new Hashtable();

define the PROVIDER_URL and INITIAL_CONTEXT_FACTORY, this setting is for Jboss, you might have to look at your application server document.

CODE
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");

Context ct = new InitialContext(env);
Object o = ct.lookup("${Your EJB}");
YourHomeInterface eh = (YourHomeInterface) PortableRemoteObject.narrow(o, YouHomeInterface.class);
YourRemoteInterface h = eh.create();
System.out.println(YourRemoteInterface.YourMethod("Hello")); Invoke the method

This is my file and example

How to : MS Outlook connects with Windows Live Mail

March 30th, 2008 | No Comments | Posted in Knowledges, Techniques

I created a new hotmail account, and am??having the problem connecting with outlook 2003, beucase the new windows live mail do not allow outlook to connect with it. So, it needs a connector, and the problem is solved.

The alternative medicine cabinet

March 29th, 2008 | No Comments | Posted in Culinary, Knowledge

Cabbage: for food poisoning
Well-cooked cabbage and the water it’s been boiled in are effective at clearing up minor diarrhoea and sickness caused by food poisoning. “White cabbage, in particular, is very high in sulphur, which helps destroy harmful bacteria in your stomach,” says Susie Perry from nutrition therapy clinic Smart Nutrition. Try to eat at least three large tablespoons of thoroughly boiled leaves, or sip a cup of the cooking water.

Walnuts: for winter blues
“Walnuts are a fantastic source of zinc, amino acids and omega 3 and 6, which help prevent depression,” says pharmacist Margo Marrone of the Organic Pharmacy, which is dedicated to organic health and beauty treatments. “Walnuts influence the levels of serotonin in the brain and help to nourish the nervous system. You should aim to eat a small handful every day. ” Other feelgood foods include flax seed, almonds and sunflower seeds, which are high in tryptophan, an essential amino acid that increases the production of serotonin.

Cinnamon: for bloating and indigestion
Research has shown that this aromatic spice helps inhibit the growth or E coli when added to food. It encourages the digestive system to work efficiently and can be used to treat indigestion and flatulence. ‘And because it improves appetite, it’s also an effective herb to use when recovering from a cold or flu,’ says medical herbalist Dr An Walker. Stir a half-teaspoon of powder into a warm drink or porridge every morning.?? Use only small amounts and do not take it you’re pregnant.

Horse Chestnut: for aching joints and muscles
Horse chestnut strengthens the walls of small blood vessels and helps treat aching muscles, varicose veins and swollen ankles caused by weakened veins.

The perfect roast chicken

March 29th, 2008 | No Comments | Posted in Culinary

I have watched Heston Blumenthal and liked him very much. I tried some dishes from the program which is the perfect roast chicken. It was work very well. I used the technique which is called “low-temperature cooking”. This technique use low temperature and long time to cook. Moreover, there are some techniques that I used from the program which I’ll show in this article. This dish use a whole organic chicken and approximately 1 day to cook.

1. Soak the poultry in 8% slated water for 6 hours.
2. After 6 hour, soak the poultry in cold water for 1 hour, but change the water every 15 minutes.
3. After 1 hour, plunge the poultry into boiling water for just 30 seconds and plunge into iced water to stop the heat penetrate into the poultry. Do this process 2 times. This process makes poultry to more succulent and juicy.
4. Dry the skin with tissue paper and leave it in the fridge for 1 day. This process makes the skin crispier.
5. Roast the poultry in the oven for at least 3 hours at 60?? C. Use thermometer the measure whether the poultry cooked or not. Make sure that the deepest of the poultry stay at 60?? C at least 15 minutes. You will please with this result.
6 However, this technique doesn’t brown the skin. You can fried the skin later if you want.


This chicken uses the above technique. The skin was crispy and the flesh was juicy and succulent. When I carved the poultry, I could see all of the juice came out. It was superb.


This chicken I didn’t use the above technique. I could see the different between those two. When I carved the poultry, the flesh was soft but not succulent, because all the juice come out duringroasting time. I could see the fat sitting at the bottom of the tray.

Michelin Star

March 29th, 2008 | No Comments | Posted in Knowledge

On 13 January 2008, I’m going to the three-Michelin-star restaurant, The fat duck at Bray, the second best restaurant in the world. So, I started to curious what’s the Michelin star mean? It didn’t take long to know, just a couple words in the Google.com, you can search everything in the world.

The Michelin star is come from Michelin group, which is located in France. There is a book called Red guide for the restaurant around Europe and also Green guide for tourism. So, critics from Michelin group visit the restaurants around EU, if they think this restaurant is good, food is delectable, service is impeccable, they will give a star to that restaurant. The inspectors use secret criteria that even the most experienced chefs don’t know about it.

Reference : http://en.wikipedia.org/wiki/Michelin_Guide

Cheese knives

March 29th, 2008 | No Comments | Posted in Culinary, Tips & Advice

Today, while I was walking in the Fenwick, one thing that came to my eyes is a cheese knife. And I don’t know how to use it at the table. As in the picture, the cheese knife has a stainless blade on one side and forked tip that is used as a lifter for pieces of cheese

Cheese Knife

Reference : http://www.recipetips.com/glossary-term/t–37396/cheese-knife.asp

Tags: ,