karthik kummar wrote:Hi Friends i am new to java beans. i am trying to implement Simple MDB using Netbean tool. but in client programming, i am getting error at JNDI lookup line. i am using JBOSS as server. my coding details are given below.
MDB code:
ejb-jar.xml:
jboss.xml:
client code:
MDB is deploying without any error, but while run the client program 21st line searching for connection factory getting failed with error as null pointer exception whether i have to change in *.xml files. could you please advice on this.
Wendy Gibbons wrote:sorry a DOH moment, hashmaps DOH.
Wendy Gibbons wrote:
Andrew Moko wrote:
Wendy Gibbons wrote:I do, you can either have 20 small classes, or 1 enum each with it's own method
can you show me how you would do it with generics?
Sure. Here's my two centavos..
This method allows languages to be set dynamically without necessarily modifying the LocalizationDataModel class.
you haven't shown how you get the language class from the ID that is supplied, how you get rid of that big case statement?
Wendy Gibbons wrote:I do, you can either have 20 small classes, or 1 enum each with it's own method
can you show me how you would do it with generics?
Wendy Gibbons wrote:Have a look at enums (not enumerations)
here is a good page:
http://docs.oracle.com/javase/1.5.0/docs/guide/language/enums.html
I would make a method in ModelToCheck that took a language and s_TheTranslation, then this code could be inside model to check.
then inside model to check it could use the enum.
here is some psuedo code, because how to get the correct enum from the id is a bit of a learnt trick (it will not compile)