Hi All, I have a question. In EJB 2.0, we have this ejb-jar.xml file and no annotations right. Now, In EJB 3.0 we have annotations and I know that, what I don�t know or get confused is if
1). There is no ejb-jar.xml file at all since we are using annotations
(Or)
2). The ejb-jar.xml file need not be coded but is automatically generated.
The ejb-jar.xml is not mandatory but is optional. The ejb-jar.xml will not be auto generated by the application server, but will have to be provided by your application.
Originally posted by Jaikiran Pai: The ejb-jar.xml is not mandatory but is optional. The ejb-jar.xml will not be auto generated by the application server, but will have to be provided by your application.
Ok, so you are saying in EJB 3.0, having ejb-jar.xml file is optional and we can have it or not. But in EJB2.0, it is mandatory right?/
EJB2 components can be compiled under JDK 1.4, which does not support annotations. One reason annotations were added to Java 5 was to eliminate the need for a separate metadata declarations file.
A lot of modern-day frameworks support both annotations and XML. In part, this is to allow backwards compatibility, but the XML is also a way to override the annotations. Unlike annotations, you don't have to have source code and recompile - just pack a new JAR, WAR, EAR or whatever. By using the XML you have the ability to tweak stuff that you've only been given binaries for.
Actually ejb-jar.xml file provides the metadata of the EJBs plus it also includes some other useful stuff like defining security roles, method permissions, transactions etc.
One of the advantages of the configuration/meta data files is without changing the actual application code we can change the application behavior by changing these property values.
Now if we move these settings to the annotations in the actual business components, do we need to change the components code, build and redeploy every time if there are any changes in those property values.
Vidyasagar Guduru wrote:Actually ejb-jar.xml file provides the metadata of the EJBs plus it also includes some other useful stuff like defining security roles, method permissions, transactions etc.
One of the advantages of the configuration/meta data files is without changing the actual application code we can change the application behavior by changing these property values.
Now if we move these settings to the annotations in the actual business components, do we need to change the components code, build and redeploy every time if there are any changes in those property values.
Just to add to above post..
metadata config/deployment descriptors files are also a way to override annotations. For every xml tag in the ejb-jar.xml there is an equivalent annotation...
Hi all
I have a question . I know the IP Address and port number of another system which is running with sun app server. Now I want to access the methods from another client system in ejb 3.0. please tell the details of that properties file completely