Shibu Raj

Greenhorn
+ Follow
since Jan 24, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shibu Raj

Hi Manju Mani,

The current exams test your understanding on J2EE 1.3 and EJB 2.0.

Regarding the second questions, Yes when the next version of exam is out, you will definitely need to upgrade yourself to that, to show your competence in the new version as well. As per some web sources, what I understood is the next version of the exam will take atleast 6 months to be available. Please note that this information is not from SUN or any one associated with SUN, So it may or may not be correct.

What I feel is better you prepare and take up the exam and then if needed you can upgrade your skills when the next version of the exam is out.

Shibu Raj
Hi Xiao Ping,

I have read about this in Ed Romans EJB 3rd Edition book. Please refer to page number 138 - 139 in 3rd edition of the book. There he also explains about how it is being used in EJB Lifecycle as well. Hope this will clear out your confusion.

After going through this, if you are not clear, post your question will try to help you.

Thanks
Shibu
Hi Amit,

As I mentioned earlier, for developing EJB you need to know Java only. Knowledge of JDBC will be an asset when you deal with Bean Managed Persistance. With regard to JSP,Servlets.. those pieces doesnt have a direct influence on your ability to develop EJB or in learning EJB. JSP, Servlets comes under the presentation layer technology. But EJB is ment for the business layer. So as such knowledge of JSP doesnt have any direct influence on your ability to develop EJB.

But when you consider a whole application, presentation layer is also important. In that sense JSP is required and will be useful.

Hope this explains your question.
Thanks
Shibu
Hi Amit,

If you are good with Java and JSP, to get started in EJB that is more than enough. May be you cann grab the SUN's tutorial on EJB or Ed Roman's EJB book(pdf) from theserverside.com and can get started.

As far as software requirements, you need an EJB Server to start playing with EJB. For that also you can choose Sun's reference implementation or from open source like JBOSS.

Once you have these then only thing needed is your time and enthusiasm to read and try out.

Good Luck my friend.

Shibu
Q1) You need to provide meaningful implementation for your hashcode and equals method if you are using custom primary class. This is required in order to obey the general contracts between java objects. In this case each of your primary key instance is an object and it needs to obey the object contracts. To learn more about Java Object Contracts, take a look in to Chapter 3 of Effective Java Book; which explains all these in detail.

Moreover, most of the collection classes and algorithms related to Collection classes depend heavily on the equals. So if you havent provided meaningful implementation of these methods according to your scenario, you wont get meaningful results in your program. In most cases, even you will get very funny results too.

With regard to CMP EJB's, I think most of the finder methods use collection classes to return the correct instance of the object. So it is very much required to implement the above said funtions.

Q1) If you are using a single primary key, you will be mostly dealing with generic data types like a string or int or even dates. For all these generic data types java knows how to handle meaningfully the above functions. In other words the implementation for toString(), hashCode() equals() is already available with Java and that will hold good in all cases. This is the reason you dont need to have your own implementation for these cases.

Thanks
Shibu
Hi,

In a simple sentence, EJB-QL is a standard notation for expressing CMP query operations. I mean for quering the Container Managed Persistent Java Objects. SQL is the standard to query RDBMS.

I would advice you to take a look at Appendix D of Mastering EJB by ED Roman. This will give you a very clear insight in to what EJB-QL means and what operations you can do with EJB-QL.

Thanks
Shibu
Hi Niran,
It seems like you have some class path issue. Look at the next post in the forum by Cliff DeRose. Will get some idea. Also make sure that you have the JDK run time in the path.( Hint from the post by Cliff DeRose).


Thanks
Shibu
Hi there,

I am sure that Orion 2.x does support JMS; but I am not sure with the version 1.3. For me it looks like the Orion application server is not configured to start the JMS server during server startup. Make sure that you have the JMS Server configuration file supplied with hostname, address, JNDI resource name etc.

Also Orion website has an article for configuring SonicMQ. You can use that as the starting point.

Thanks
Shibu
Hi Mahesh,
It looks like a perfect secnario to use the Web Service Support provided by J2EE. PHP also have some excellent support for consuming a web service.

In your case, if you are planning to write new EJB's then provide them with web service endpoint as well, which can be called by your PHP application.

Suppose if the EJB is already written and being used by some other application, Have a new wrapper EJB which uses the existing EJB's to get the work done and expose this new wrapper EJB as a web service. Please note that to expose as a web service we need to have the wrapper as a stateless session bean.

Once this is deployed you can have your PHP application consume this web service to interact with each other.

By having this kind of system architecture will make your PHP and EJB applications loosely coupled. Since Web service is session bean, all the benifits of session bean will also be available for this case.

Thanks
Shibu Raj
Hi Friends,

I you are looking for easy installation and configuration, then as mentioned in the previous posts JBOSS or SunOne App Server will be the best to play with. Both have excellent documentation and plenty of resources are available in Internet too.


In case of JBOSS, and you want to learn CMP, it supports almost all Open source and Commercial Database products without much exercise from your part. For e.g. it has AN excellent support for mySQL, Firebird etc. The installation and configuration are pretty straightforward and very easy. Also its light weight, its not memory hungry as well.

SunOne App Server is also an excellent one to install and play around in your desktop. Like JBOSS; its not so memory hungry and light weight too. It has a very intuitive and easy to follow admin console which is slightly better than what JBoss have. Also supported by excellent documentation from Sun, which you can download from Sun�s web site. Moreover Sun provides tools like Deployment verifier, which makes things little easy than Jboss.

Web Logic is an excellent server, and because of more advanced features it carry it is bit memory hungry than others. If you start the server in you desktop, which has about 512M memory, then you won�t feel easy working with other software�s installed in the same machine. If you have say 1G if memory then you can try it out.

As always, if you want to make your hand dirty while learning EJB, try using Open Source servers like JBOSS.

Thanks
Shibu
Hi sitaram irrinki,

The question is more of general nature and so I wont be able to give you a very specific answer to the problem you are facing. But the best way to handle exceptions generated by your EJB's is to encapsulate the exceptions generated by EJB's in to your own application exceptions and throw that to JSP. Once you have the exceptions in EJB you can handle as you like. The good thing about this process is you can encapsulate the EJB error messages in to your own custom error message, which make more sense to your application users.

Note : In the Ed Romans EJB book there is an example also for this, in which he generates the AccountException in the EJB Layer.

Hope that example will help you to solve the problem.

Thanks
Shibu
Hi there,

Make sure that you include appserv-rt.jar in the class path for the client application. This jar contains the jndi.properties file which contains all bootstrapping properties for the Application servers naming services.

Thanks
Shibu
With my limited knowledge I will try to answer some of your qeries.
Spring in just a framework like Struts for rapid web application development. My personal opinion is Spring is much powerful than other frameworks. The design principles employed are simple, lightweight and straight forward.

Spring can use concurrently with EJB as well. Its not a replacement for EJB. Its make the developement and Integration of web applications much easier, Moreover Spring's designers have taken in to account some of the design fallacies with EJB.

Also now a days, people are using Spring because they are realising the power of Spring, and in my opinion its a better framwork to learn and time you spend in this is going to be a better investment.

EJB 3.0 is just in its beta state and so may be a good option for research kind of study. Sun Spec commitee is still working on it and JBOSS has already implemented the EJB3.0 spec in JBoss AS 4.0 version. Also its not a replacement tech for Spring.

Good Luck.

Thanks
Shibu
For Generation of PDF files we have created a web service which accepts the data in XML file and the formatting info as XSLT file. This is flexible in the sense, other applications also call the same webservice to have the PDF generation power. We used Apache Axis and XML/XSL FO for the PDF conversation.

Good Luck!

Thanks
Shibu
I think (Not Sure) JBoss IDE; plugin for Eclipse from JBoss Supports EJB3.0 Spec to some extent. I havent used EJB3.0 till now. But I am sure EJB3.0 Spec and AOP are currently supported by JBOSS IDE 1.4.1.

Good Luck !

Thanks
Shibu