Vijay K Vivek

Greenhorn
+ Follow
since Oct 11, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Vijay K Vivek

Thanks for your response Pradip.
Why is it that the JAXB forces the usage of object factory rather than allowing the use of new instance creation? Any advantages to this design approach?
You can use JAXB.

1) Get the xml schema definition for your xml.
2) Use JAXB to get the corresponding element classes for your XSD (xml schema definition )
3) In the code that you have use the unmarshaller and obtain the objects for the XMl elements.
4) Write mappers which will map between your value objects (beans) and the objects of the JAXB generated classes.
"JAXB generates interfaces representing the content (domain) objects. This means when it is time to create the object tree, you can't just instantiate these objects. You have to use the ObjectFactory created by JAXB to create each new object. This can be a bit tedious compared to creating other objects with a typical new. "

Recently Icame across an article on JAXB. The author makes the above observation. I do not understand why it is tedious to use a factory than a new.

For me both ways it is one single statement by itself.

Please shed me some light on the above.

PS:The article is available here. http://www.onjava.com/pub/a/onjava/2004/05/05/jaxb.html?page=4
Mark

Thanks a lot. The explanation was excellent and I understood the purpose with this. I guess I was missing on the part "how did Hibernate know" before. Now it is clear.
Thanks for the reply.
Why do we need to discriminate between the types and super types in a object relational mapping?

Also the hibernate documentation mentions that the valid values are 'null' and 'not null'. What will I do with these valid values? How can they discriminate?
I am learning Hibernate and am a newbie to the same. I do not understand the purpose served by the discriminator attribute of the class mapping. I tried reading a couple of articles on the same but still I do not understand where it will be required to use the same. Please throw some light on the same.
You can use the getRequestURI() method on the HttpServletRequest object.

request.getRequestURI() should strip off the query string and provide the url from the protocol upto query string.
17 years ago
yes it will work. In the manifest.mf of your war, mention it in the proper order as per my previous post it should work.

Also there is an alternative and I usually do this. I will remove the unwanted classes from the other jar (which have older version) and repack it. This way there will be no confusion as such.

In your case remove the classes from a.jar. This can be done because anyways it is just for your testing purpose and temporary as you have mentioned.
17 years ago
Why cant you have one final version of the jar? I believe it is not a good way to pack the same classes in two different jars. Instead of trying to solve this symptom, why cannot you try to solve the root cause.

Having said that if you still have to do it your existing way, in the manifest.mf of your war or ejb.jar move the b.jar above in the order than a.jar. This is assuming you have mentioned the classpath of the jars in the manifest.mf.

If you have used shared libraris for defining the class path perform the same procedure there.
17 years ago
Thank you. That was a good compilation.
17 years ago
Richard,
When you mean set up a filter, do you mean writing a servlet filter and filtering based on IP address. If I use the request.getRemoteAddress as suggested previously will it not still have the same issues of an approximate IP address and we can never be sure of the real source?
17 years ago
It can be done by the usual way of customising error pages by declaring the customised jsp against 404 error in the web.xml by adding the below entry.

<error-page >
<error-code >404 </error-code >
<location>/xxyyzz.jsp </ location >
</ error-page>

But I am not sure if I understand your question correctly because this is common place and you are already SCWCD certified. Can you be more specific if this does not answer your question?

[ October 21, 2007: Message edited by: Vijay K Vivek ]

[ October 21, 2007: Message edited by: Vijay K Vivek ]
[ October 21, 2007: Message edited by: Vijay K Vivek ]
17 years ago
The following is a snippet from the server start up console in RAD.

*** indicates classloader where the missing class could have been found
[0] com.ibm.ws.bootstrap.ExtClassLoader@7fb1a6b6
[1] sun.misc.Launcher$AppClassLoader@7fa1e6b6
[2] sun.misc.Launcher$ExtClassLoader@7fdde6b6

Hi
It looks like these are the class loader where in my classes have been loaded. Can any one please let me know what class path 0,1 and 2 class loaders refer to? Where in admin console I can find the corresponding class paths to define missing paths?
[ October 19, 2007: Message edited by: Vijay K Vivek ]
17 years ago