env-entry element in ejb-jar.xml
I just started to create my ejb-jar.xml (deployment descriptor file) manually so
that I won't depend on those generated by proprietary IDEs.
The ejb-jar_2_0.dtd specifies that env-entry is used in
entity, message-driven, and session elements.
My question is - When do we use the element <env-entry>? Under what
circumstances that ejb-jar_2_0.dtd necessitates its provision in the ejb-jar.xml
in relation to entity, message-driven, and session elements?
Hi,
I've same prob here
<env-entry>
<env-entry-name>config.file.location</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>C:/bea/ITReportingConf.xml</env-entry-value>
</env-entry>
Right now config file is out side of my EAR, How can i put it within the EAR I tried with changing the
<env-entry-value>/ITReportingConf.xml</env-entry-value> Value
But i dont know which dir it is refering to and where should i put "ITReportingConf.xml" File
Thanks
Similar Messages
-
How to add environment entry in EJB3 ejb-jar.xml
Hi,
Is that a build in way of add environment entries in JDev for EJB 3 beans? For EJB 2 beans you can do that using properties. But the bean properties is not available in EJB 3. Please help.
Thanks
KennyThank you for the reply. But I need a way to enter env-entry value in ejb-jar.xml for EJB 3 in Jdev. In EJB 2, Jdev generate ejb-jar.xml for the bean and also let you add env-entry through bean's properties menu. But in there in no properties menu for EJB 3, also generated ejb-jar.xml is only a empty file doesn't contain any EJB depolyment information. That means you have to code ejb-jar.xml all manually.
If I am wrong, can someone show me how to do this right? -
What are the necessary elements in ejb-jar.xml with CMP entity bean
What are the necessary elements in ejb-jar.xml with CMP entity bean
Actually i am using webligic 8.1 and while deployment getting the error that
some elements r missing
Thanks
Anand PritamAccording to the ejb-jar.xml dtd ejb-name, ejb-class, persistence-type, prim-key-class, reentrant are the required elements for an entity bean.
<!ELEMENT entity (description?, display-name?, small-icon?,
large-icon?, ejb-name, home?, remote?, local-home?,
local?, ejb-class, persistence-type, prim-key-class,
reentrant, cmp-version?, abstract-schema-name?,
cmp-field*, primkey-field?, env-entry*, ejb-ref*,
ejb-local-ref*, security-role-ref*, security-identity?,
resource-ref*, resource-env-ref*, query*)> -
More information about the ejb-ref element of ejb-jar.xml
Hello,
I am currently studying ejbs and I came across the ejb-ref element of the ejb-jar.xml file. I am in reference to O'Reilly Entreprise JavaBeans book. The book says that, thanks to the ejb-ref element it is possible to access one ejb from another ejb with the following client code:
InitialContext jndiContext = new InitialContext();
Object ref = jndiContext.lookup("java:comp/env/ejb/ProcessPaymentHomeRemote");
ProcessPaymentHomeRemote home = (ProcessPaymentHomeRemote) PortableRemoteObject.narrow(ref, ProcessPaymentHomeRemote.class);I thought one could invoke the above client code without the ejb-ref element being present in the ejb-jar.xml... I am right or wrong?
Then why the need for the ejb-ref element? Can anyone give me a concrete example of usage of the ejb-ref element where the ejb-ref element really is useful? What are the advantages of using the ejb-ref element?
Thanks in advance,
Julien Martin.Hi Julien,
The main reason is portability. It's true that in many J2EE implementations it is possible to access an EJB's Home object without going through the component context (java:comp/env), but all such approaches are NOT portable. In the J2EE programming model, all resource access is made via the private component namespace. Using this level of indirection allows the bean developer to code the application without having to know which physical resource will be used at runtime. Each J2EE implementation can use a different scheme to identity physical resources, so by sticking to logical references in your code, you guarantee portability. Finally, you have the advantage that you can change which physical resource is mapped at deployment time without having to change your code.
So, the bottom line is, whenever you have any J2EE component (ejb, servlet, jsp, Application Client) that looks up an ejb, data source, queue, connection factory, etc., always use the environment reference type that J2EE defines for it and look it up via java:comp/env.
--ken
Kenneth Saks
J2EE SDK Team
SUN Microsystems -
Help needed - why we use ejb-ref element in ejb-jar.xml
hi all
can anyone tell me what is the purpose of this element in the ejb deploy descriptor? thanksSuppose u have bean A, which needs to look up another bean B. Normally you wud need to use the jndi lookup using the initial context to access the bean B's home interface. If you use ejb-ref element you dont need to know the JNDI name of bean B. You can use ejb-ref-name instead. So you can say this is a short cut method of looking up and getting a reference to a bean's home object.
-
Can't create EJB from existing .java AND ejb-jar.xml entries
I've noticed that I can create the source files for an EJB outside of JDeveloper, then I can do the "Create Entity Bean" thing, and specify the path to the source files, and it will use those source files, instead of forcing me to create them again.
However, I've noticed that if I manually add the information to the "ejb-jar.xml" file, and then try to add the bean, it won't let me. I've found I have to delete the entry from the ejb-jar.xml file and let JDeveloper control the creation of the fields, even if I know exactly what needs to be set.If you are adding/modifying ejb-jar.xml outside JDeveloper and trying to see the changes.
Save the ejb-jar.xml file which is being modified externally
Select ejb-jar.xml in JDeveloper
and do View | Refresh
This will load in the changes (providing the source path has been set properly)
raghu
JDev Team -
ERROR: Error parsing 'ejb-jar.xml'
Hello ppls,
i am getting the following error while compiling using ejbc :
ERROR: Error parsing 'ejb-jar.xml' line 25: The content of element
type "entity"
must match "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,
my ejb-jar.xml looks like this
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://www.java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'
>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Account</ejb-name>
<home>wlEntityBeanexample.AccountHome</home>
<remote>wlEntityBeanexample.Account</remote>
<ejb-class>wlEntityBeanexample.HelloBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<transaction-type>Container</transaction-type>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<resource-ref>
<res-ref-name>mysql</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Account</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
<ejb-client-jar>AccountClient<ejb-client-jar>
</ejb-jar>
I compared the file with other ejb-jar.xml file coming as an Example
in Weblogic, i didn't find any difference.
Thanks in Advance,
PrashantThanks Deepak, i got it running at last.
Prashant
"Deepak Vohra" <[email protected]> wrote in message news:<[email protected]>...
The entity element in ejb-jar.xml should be of the
format:
<!ELEMENT entity (description?, display-name?, small-icon?,
large-icon?, ejb-name, home?, remote?, local-home?,
local?, ejb-class, persistence-type, prim-key-class,
reentrant, cmp-version?, abstract-schema-name?,
cmp-field*, primkey-field?, env-entry*, ejb-ref*,
ejb-local-ref*, security-role-ref*, security-identity?,
resource-ref*, resource-env-ref*, query*)>
transaction-type is not defined for a entity ejb.
<entity> <ejb-name>Account</ejb-name> <home>wlEntityBeanexample.AccountHome</home>
<remote>wlEntityBeanexample.Account</remote> <ejb-class>wlEntityBeanexample.HelloBean</ejb-class>
<persistence-type>Bean</persistence-type> <prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant> <cmp-version>2.x</cmp-version>
<resource-ref> <res-ref-name>mysql</res-ref-name> <res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth> </resource-ref>
</entity>
[email protected] (prashant) wrote:
Hello ppls,
i am getting the following error while compiling using ejbc :
ERROR: Error parsing 'ejb-jar.xml' line 25: The content of element
type "entity"
must match "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,
my ejb-jar.xml looks like this
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://www.java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'
>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Account</ejb-name>
<home>wlEntityBeanexample.AccountHome</home>
<remote>wlEntityBeanexample.Account</remote>
<ejb-class>wlEntityBeanexample.HelloBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<transaction-type>Container</transaction-type>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<resource-ref>
<res-ref-name>mysql</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Account</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
<ejb-client-jar>AccountClient<ejb-client-jar>
</ejb-jar>
I compared the file with other ejb-jar.xml file coming as an Example
in Weblogic, i didn't find any difference.
Thanks in Advance,
Prashant -
How can I validate the ejb-jar.xml against a downloaded ejb-jar_2_1.xsd
I downloaded all configuration XML file schema,
so we can point to the schema locally. (To be able to work
even the network is not there.)
I tried to change the xmlns, xmlns:xsi and xsi:schemaLocation in the root element of ejb-jar.xml file,
I can't figure out how to make the server load the local ejb-jar_2_1.xsd file.
I'll appreciate someone can explain how the xsd file is loaded.
Thanks
Zhongor use a tool like XMLSpy to validate your ejb-jar.xml against the XSD.
Cheers!
Dips -
Issue with [env-entry] element in web.xml
I know it's possible to define [env-entry] elements in web.xml for environment
properties of a web application. But how do you access [env-entry] elements from
classes that do not exist within a web application? In other words, this is my
problem:
I have an EAR file, enterprise.ear, which contains the following...
employee.jar
employeeSearchEJB.jar
webApp1.war
META-INF/
application.xml
The employee.jar file is a utility archive that contains common classes, one of
which is a class called LogManager. LogManager needs to read environment properties
in order to initialize itself. Currently, LogManager reads these properties from
a property file, and therefore it needs to know the name of the property file
in order to access it. I dont like this approach because I'm forced to hard-code
the name of the property file in LogManager. I would rather leverage the power
of J2EE deployment descriptors and use the [env-entry] element to define the environment
properties for the LogManager class. Then, I would simply use JNDI to get the
values of the [env-entry] elements without ever having to specify their location
aside from the default JNDI context; java:comp/env, which is standard anyway.
The problem I'm having is that you can define the [env-entry] element in only
2 types of deployment descriptors; namely, web.xml and ejb-jar.xml, neither of
which are available to LogManager because LogManager exists at the EAR root level.
I was hoping application.xml supported the [env-entry] element, but it doesn't.
Any suggestions?
SAFSAF,
I am not sure if this applies to you situation but if you create an initial context
instance and then grab the value using the jndi name within that context then
you should be able to grab that environment variable.
I have a helper class that is used as part of a deployed application. The helper
class doesn't have access to the Servlet context but it is created as part of
the application workflow. When it gets initiated it grabs an env-entry created
in the web.xml deployment descriptor to find the default url for a content path.
After I create an initialContext, I perform a initContext.lookup("jndi.env.entry.here")
where "jndi.env.entry.here" is the name specified in the env-entry tag.
This returns the value of the entry.
This works under both Jrun and Weblogic so my guess is it should work for you.
Again, I am assuming that your class will at least be able to grab a context
object to communicate back to the server.
Hope this helps,
Troy
"SAF" <[email protected]> wrote:
>
I know it's possible to define [env-entry] elements in web.xml for environment
properties of a web application. But how do you access [env-entry] elements
from
classes that do not exist within a web application? In other words, this
is my
problem:
I have an EAR file, enterprise.ear, which contains the following...
employee.jar
employeeSearchEJB.jar
webApp1.war
META-INF/
application.xml
The employee.jar file is a utility archive that contains common classes,
one of
which is a class called LogManager. LogManager needs to read environment
properties
in order to initialize itself. Currently, LogManager reads these properties
from
a property file, and therefore it needs to know the name of the property
file
in order to access it. I dont like this approach because I'm forced to
hard-code
the name of the property file in LogManager. I would rather leverage
the power
of J2EE deployment descriptors and use the [env-entry] element to define
the environment
properties for the LogManager class. Then, I would simply use JNDI to
get the
values of the [env-entry] elements without ever having to specify their
location
aside from the default JNDI context; java:comp/env, which is standard
anyway.
The problem I'm having is that you can define the [env-entry] element
in only
2 types of deployment descriptors; namely, web.xml and ejb-jar.xml, neither
of
which are available to LogManager because LogManager exists at the EAR
root level.
I was hoping application.xml supported the [env-entry] element, but it
doesn't.
Any suggestions?
SAF -
JNDI and env. vars. in ejb-jar.xml
I have been trying for several days now to have my EJB session bean access
its env. vars. stored in the ejb-jar.xml document. I have been unsuccessful.
The only place I have been able to store my env. vars. is in the web.xml
document outside my .jar file. Although workable, it would be preferable to
store them in the ejb-jar.xml document in my .jar file.
I am hoping some one can help me. I am using the following code in my ejb:
Context init = new InitialContext();
Context env = (Context)init.lookup("java:comp/env");
m_bTruncCorporate =
((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
My ejb-jar.xml follows:
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>MICRworksBean</ejb-name>
<home>USDataworks.MICRworks.MICRworksHome</home>
<remote>USDataworks.MICRworks.MICRworks</remote>
<ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<description>Flag indicating whether to convert corporate
checks</description>
<env-entry-name>TruncateCorporate</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
<env-entry>
<description>Location of the 1For1 exclusion files</description>
<env-entry-name>OptionFilePath</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-value
>
</env-entry>
<env-entry>
<description>Name of the 1For1 account exclusions file</description>
<env-entry-name>OptionFileAccount</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>account_file.txt</env-entry-value>
</env-entry>
<env-entry>
<description>Name of the 1For1 routing exclusion file</description>
<env-entry-name>OptionFileRouting</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>routing_file.txt</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MICRworksBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
and my weblogic-ejb-jar.xml:
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0
EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>MICRworksBean</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<jndi-name>MICRworksBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
My feeling is that I am missing some sort of reference in the
weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried several
things without success.
I would appreciate any help I can get...especially if it contains specific
code I can use as I am rather new to writing and deploying ejbs!
Thanx in advance. Marek :-)Thanks for the reference. I was using another book as a reference (Using
Java 2 Enterprise Edition by Mark Wutka) which had the same sort of example
and as you can see below, I coded my bean as they suggest...I'm still unable
to access the env. vars.!
I deployed by bean using WebLogic's Builder and but didn't create any sort
of application. I let WebLogic do what it would on its own. The WebLogic
documentation seemed to indicate for simple testing this would work
fine...is it wrong?
btw. MICRworks.MICR_ENV_TRUNCORP equates to "TruncateCorporate" as you
probably guessed.
The WebLogic Admin Console shows the environment variables in the EJB
Descriptors for my EJB but they do not show up when I view the JNDI tree for
my server. I have taken this to mean that the deployment tool is not
binding my env. vars. for some reason which would explain why my bean can't
find them.
I know it must be something stupid I am doing (or not doing) but I just
can't see it. Please help!
"Ryan LeCompte" <[email protected]> wrote in message
news:[email protected]...
>
Hello Marek,
I would suggest that you download the free book "Mastering EJB 2ndEdition" by
Ed Roman, Scott Ambler, and Tyler Jewell. The source code for the book isalso
freely available and is meant to be deployed specifically on WebLogic.Look for
a sample application called "Jasmine", which shows how to use environmententries.
You will see a concrete example of how they are defined and later accessedfrom
within EJBs. The book and source code are available at the followingaddress:
>
http://www.theserverside.com/books/masteringEJB/index.jsp
Best regards,
Ryan LeCompte
[email protected]
http://www.louisiana.edu/~rml7669
"Marek Kossak" <[email protected]> wrote:
I have been trying for several days now to have my EJB session bean
access
its env. vars. stored in the ejb-jar.xml document. I have beenunsuccessful.
The only place I have been able to store my env. vars. is in the web.xml
document outside my .jar file. Although workable, it would be preferable
to
store them in the ejb-jar.xml document in my .jar file.
I am hoping some one can help me. I am using the following code in my
ejb:
Context init = new InitialContext();
Context env = (Context)init.lookup("java:comp/env");
m_bTruncCorporate =
((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
My ejb-jar.xml follows:
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>MICRworksBean</ejb-name>
<home>USDataworks.MICRworks.MICRworksHome</home>
<remote>USDataworks.MICRworks.MICRworks</remote>
<ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<description>Flag indicating whether to convert corporate
checks</description>
<env-entry-name>TruncateCorporate</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
<env-entry>
<description>Location of the 1For1 exclusion files</description>
<env-entry-name>OptionFilePath</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-valu
e
>>>
</env-entry>
<env-entry>
<description>Name of the 1For1 account exclusions file</description>
<env-entry-name>OptionFileAccount</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>account_file.txt</env-entry-value>
</env-entry>
<env-entry>
<description>Name of the 1For1 routing exclusion file</description>
<env-entry-name>OptionFileRouting</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>routing_file.txt</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MICRworksBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
and my weblogic-ejb-jar.xml:
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
7.0.0
EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>MICRworksBean</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<jndi-name>MICRworksBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
My feeling is that I am missing some sort of reference in the
weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried
several
things without success.
I would appreciate any help I can get...especially if it containsspecific
code I can use as I am rather new to writing and deploying ejbs!
Thanx in advance. Marek :-) -
ejb-local-ref where to put this tag in ejb-jar.xml ??
I have an ejb-jar.xml that looks like this. I have had no problem with remote interfaces. Now I want the bean to have a local interface too.
Just let me know where the tag I have mentioned for the <ejb-local-ref> has to be put into.
When I compile this file it throws me an error which i have shown below the output of the ejb-jar.xml file
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>IDMaster</ejb-name>
<home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
<remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
<local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
<local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
<ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
<persistence-type>Container</persistence-type>
<ejb-local-ref>
<ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
<local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
</ejb-local-ref>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>IDMaster</abstract-schema-name>
<cmp-field>
<field-name>idPrefix</field-name>
</cmp-field>
<cmp-field>
<field-name>idValue</field-name>
</cmp-field>
<primkey-field>idPrefix</primkey-field>
<query>
<query-method>
<method-name>findAllIDMasters</method-name>
<method-params/>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>IDMaster</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
I have also added the following tag in the weblogic-jar.xml
<local-jndi-name>IDMasterEJB.IDMasterLocalHome</local-jndi-name>
Just let me know whether I am correct
On compilation (using ant utility) the error thrown is like this :
ejbc:
[java] ERROR: Error parsing 'ejb-jar.xml' line 47: The content of element type "entity" must ma
tch "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,remote?,local-home?,local?,e
jb-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-schema-name?,cmp-field*,pri
mkey-field?,env-entry*,ejb-ref*,ejb-local-ref*,security-role-ref*,security-identity?,resource-ref*,r
esource-env-ref*,query*)".
[java] ERROR: ejbc found errors
[java] Java Result: 1
Kindly Help !!!
Thanks n regards
SajivThis should take care of it
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>IDMaster</ejb-name>
<home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
<remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
<local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
<local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
<ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
<persistence-type>Container</persistence-type>
<ejb-local-ref>
<ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
<local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
</ejb-local-ref>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>IDMaster</abstract-schema-name>
<cmp-field>
<field-name>idPrefix</field-name>
</cmp-field>
<cmp-field>
<field-name>idValue</field-name>
</cmp-field>
<primkey-field>idPrefix</primkey-field>
<ejb-local-ref>
<ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
<local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
</ejb-local-ref>
<query>
<query-method>
<method-name>findAllIDMasters</method-name>
<method-params/>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>IDMaster</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar> -
Reg. Field names in ejb-jar.xml (EJB CMP)
Hi,
I am using WAS 5.1 and EJB CMP 2.0.
I got a error while dealing with the database i.e ORACLE 8.The Scenario in detail,
I had a table X with filed names 'help' and 'sequence'. When i am generating Jar file using 'ejbdeploy', the name of the field names in Table.ddl changing automatically to 'help1' and 'sequence1'. Due to this i am not able to access data from database.
Why field names are changing? Are they keywords ? con't we have field names with the above names? If they are keywords tell me the document which contains these details?
Thanks in Advance.According to the ejb-jar.xml dtd ejb-name, ejb-class, persistence-type, prim-key-class, reentrant are the required elements for an entity bean.
<!ELEMENT entity (description?, display-name?, small-icon?,
large-icon?, ejb-name, home?, remote?, local-home?,
local?, ejb-class, persistence-type, prim-key-class,
reentrant, cmp-version?, abstract-schema-name?,
cmp-field*, primkey-field?, env-entry*, ejb-ref*,
ejb-local-ref*, security-role-ref*, security-identity?,
resource-ref*, resource-env-ref*, query*)> -
Error compiling ejb-jar.xml. Help!!
I do not know why this xml file is giving me the errors displayed below.
Thank you in advance.
Here is my xml file:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://www.java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>ObjectConnectorBean</ejb-name>
<display-name>ObjectConnector</display-name>
<home>com.harris.netboss.shared.posting.ObjectConnectorHome</home>
<remote>com.harris.netboss.shared.posting.ObjectConnector</remote>
<ejb-class>com.harris.netboss.shared.posting.ObjectConnectorBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>com.harris.netboss.shared.posting.ObjectConnectorPK</prim-ke
y-class>
<reentrant>False</reentrant>
</entity>
</enterprise-beans>
</ejb-jar>
Here is the error message:
org.xml.sax.SAXParseException: The content of element type "entity" must
match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Exception.java:42)
at org.xml.sax.SAXException.<init>(SAXException.java:45)
at org.xml.sax.SAXParseException.<init>(SAXParseException.java:56)
at
weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
at
weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLEr
ror(XMLValidator.java:1280)
at
weblogic.apache.xerces.validators.common.XMLValidator.callEndElement(Compile
d Code)
at
weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
ch(Compiled Code)
at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled
Code)
at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:128)
at
weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
at weblogic.ejbc20.runBody(Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:81)
at weblogic.ejbc.main(ejbc.java:20)
--------------- nested within: ------------------
weblogic.xml.process.XMLParsingException: The content of element type
"entity" must match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
. - with nested exception:
[org.xml.sax.SAXParseException: The content of element type "entity" must
match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
.] Line: 16 Column: 16
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at weblogic.utils.NestedException.<init>(NestedException.java:18)
at
weblogic.xml.process.XMLParsingException.<init>(XMLParsingException.java:17)
at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:132)
at
weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
at weblogic.ejbc20.runBody(Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:81)
at weblogic.ejbc.main(ejbc.java:20)
ERROR: weblogic.xml.process.XMLParsingException: The content of element type
"entity" must match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
. - with nested exception:
[org.xml.sax.SAXParseException: The content of element type "entity" must
match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
.] Line: 16 Column: 16looks like your xml file(ejb-jar.xml) is missing some required tag element or
the elements are out of
order. the format is specified in a dtd, you should take a look at the dtd for
ejb-jar.xml. for wl5.1, try looking under c:\weblogic for ejb-jar.dtd
Richard Ong wrote:
I do not know why this xml file is giving me the errors displayed below.
Thank you in advance.
Here is my xml file:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://www.java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>ObjectConnectorBean</ejb-name>
<display-name>ObjectConnector</display-name>
<home>com.harris.netboss.shared.posting.ObjectConnectorHome</home>
<remote>com.harris.netboss.shared.posting.ObjectConnector</remote>
<ejb-class>com.harris.netboss.shared.posting.ObjectConnectorBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>com.harris.netboss.shared.posting.ObjectConnectorPK</prim-ke
y-class>
<reentrant>False</reentrant>
</entity>
</enterprise-beans>
</ejb-jar>
Here is the error message:
org.xml.sax.SAXParseException: The content of element type "entity" must
match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Exception.java:42)
at org.xml.sax.SAXException.<init>(SAXException.java:45)
at org.xml.sax.SAXParseException.<init>(SAXParseException.java:56)
at
weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
at
weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLEr
ror(XMLValidator.java:1280)
at
weblogic.apache.xerces.validators.common.XMLValidator.callEndElement(Compile
d Code)
at
weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
ch(Compiled Code)
at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled
Code)
at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:128)
at
weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
at weblogic.ejbc20.runBody(Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:81)
at weblogic.ejbc.main(ejbc.java:20)
--------------- nested within: ------------------
weblogic.xml.process.XMLParsingException: The content of element type
"entity" must match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
. - with nested exception:
[org.xml.sax.SAXParseException: The content of element type "entity" must
match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
.] Line: 16 Column: 16
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at weblogic.utils.NestedException.<init>(NestedException.java:18)
at
weblogic.xml.process.XMLParsingException.<init>(XMLParsingException.java:17)
at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:132)
at
weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
at weblogic.ejbc20.runBody(Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:81)
at weblogic.ejbc.main(ejbc.java:20)
ERROR: weblogic.xml.process.XMLParsingException: The content of element type
"entity" must match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
. - with nested exception:
[org.xml.sax.SAXParseException: The content of element type "entity" must
match
"(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
.] Line: 16 Column: 16 -
Deployment issues, how is weblogic-ejb-jar.xml linked to ejb-jar.xml
Hey guys,
I'm getting the following error I think because i have something configured incorrectly in my xml files. Instead of yousing activationConfig properties in my MDB I wanted to set them in the ejb-jar.xml file manually. The following error I'm getting is...
Unable to deploy EJB: MyMDB from MDBtest2:
[EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment.
weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'inQueue' declared in the ejb-jar.xml descriptor has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor.
at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641)
at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:330)
at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1097)
at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:991)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1273)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:372)
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>MDBtest2</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>MyMDB</ejb-name>
<ejb-class>cms.crown.mdb.MyMDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-destination-link>omg</message-destination-link>
<resource-ref>
<res-ref-name>weblogic.jms.XAConnectionFactory</res-ref-name>
<res-type>javax.jms.XAConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-env-ref>
<resource-env-ref-name>inQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MyMDB</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
weblogic-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-ejb-jar xmlns:wls="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
<!--weblogic-version:10.0-->
<wls:message-destination-descriptor>
<!--lookup-method:JNDI-->
<wls:message-destination-name>omg</wls:message-destination-name>
<wls:destination-jndi-name>inQueue</wls:destination-jndi-name>
<wls:initial-context-factory>weblogic.jms.XAConnectionFactory</wls:initial-context-factory>
<wls:provider-url>http://localhost:8010</wls:provider-url>
</wls:message-destination-descriptor>
</wls:weblogic-ejb-jar>
Hope this is readable, thanks for any assistanceHi,
It looks like first thing you are using EJB3 but your XML files are still pointing to version="2.1" and very old.
<font color=red>
<ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
</font><br>
*try this: In below "ejb-jar.xml" file*
QCF = your Connection factory JNDI Name
TestQ = your Queue JNDI Name
Transaction Attribute is ByDefault = Required ...so no need to add it here.
<?xml version='1.0' encoding='UTF-8'?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="true">
<enterprise-beans>
<message-driven>
<ejb-name>MyMDB</ejb-name>
<mapped-name>TestQ</mapped-name>
<ejb-class>cms.crown.mdb.MyMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value><b><font color=maroon>javax.jms.Queue</font></b></activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>connectionFactoryJndiName</activation-config-property-name>
<activation-config-property-value><b><font color=maroon>QCF</font></b></activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationJndiName</activation-config-property-name>
<activation-config-property-value><b><font color=maroon>TestQ</font></b></activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
<assembly-descriptor></assembly-descriptor>
</ejb-jar>
"weblogic-ejb-jar.xml":
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/weblogic-ejb-jar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-ejb-jar http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd">
<font color=maroon><b> Now u need to Just define the Provider URL here...if you want a remote provider...else not required<BR> JNDI names are already defined in the ejb-jar.xml file</b></font><BR>
</weblogic-ejb-jar>
Some Links which you can refer:
To Generate the Deployment Descriptors ...in case of EJB3 Applications: *http://jaysensharma.wordpress.com/2010/04/02/generating-ejb3-clientjar/*
MDB3.0 Sample: *http://jaysensharma.wordpress.com/2009/08/17/mdb3-0-sample-for-weblogic-application-server/*
Thanks
Jay SenSharma -
Annotations to replace ejb-jar.xml?
Hi gurus,
Seems that the newest NWDS7.1 does not create ejb-jar.xml for EJB project. And I was told that currently all what we can do in ejb-jar.xml can be done with annotations right now. But where can I find available annotation list? Particularly I need the annotation to get environment entry from JNDI, which can be done using ejb-jar.xml before.
Thanks in advance.
B.R.Hi Lee,
You can find all EJB annotations in the EJB 3.0 Simplified API spec and EJB 3.0 Persistence (JPA) spec.
The NWDS also gives you tips as to the available annotations from the context menus of different nodes, e.g. in the Outline view, Java editor, etc.
Last but not least, you can find pieces of annotation reference in the various subnodes of the [online help|http://help.sap.com/saphelp_nwce10/helpdata/en/44/e9af22b9dc03fde10000000a1553f6/frameset.htm].
Particularly, you should be using @Resource for injecting env entry.
HTH!
\-- Vladimir
Maybe you are looking for
-
ABAP Logic in Transformations-Start or Field Routine Error
Hi, Below is the field routine in transformations that will calculacte No of Years between 2 dates (Source Field & System Date) It is showing me no systex Error but when i started data load ,Load is failing due to below mentioned error Routine: IF NO
-
ME_PROCESS_REQ_CUST
in method PROCESS_ACCOUNT, how to get the PR's item data as in EBAN/mereq_item internal table
-
Monitor lights up but no display
I dropped my power book and broke the hinges. When I turn it on, the screen lights up and it makes the start up sound but there is no display. I tried using an external monitor which also lights up but there is still no display. When I insert the res
-
Contact Not Being Shared from my Iphone 4S (IOS6) through message
Hi All When I share a contact from my Iphone 4S (IOS6) through message then the recipients get a message " Attachment deleted from the message to adapt to your device capabilities". This is only happening with contacts and has never happened before.
-
How to run a managed server on a different physical server?
Hi, A) I have the following configuration: 1) Server A: Weblogic software with domain is installed. MachineA (ListenAddress=localhost, port=5556) NodeManager(port=5556) AdminServer (Uses MachineA, port=7001) ManagedServer01 (Uses MachineA, port-7002)