Gili Tzabari

Greenhorn
+ Follow
since Dec 05, 2004
Merit badge: grant badges
For More
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 Gili Tzabari

I've got a long list of frequently asked questions which no one seems to know the answers to (EJB3 being new and all). Please let me know if you know the answers to any of these. In all the following questions, whenever I ask about EJB3 I am also wondering about Glassfish.

1) Is there an official EJB3 forum anywhere?

2) The specification explicitly states @Entity is meant for classes, not interfaces but then how is one supposed to use @ManyToOne against a property whose type is an interface? I believe the answer is, it is impossible. I've got a subclass which knows the exact class that @ManyToOne is supposed to map to so I'd like to define a @ManyToOne annotation in the subclass but the field is defined in the parent class. Is there a way for me to inject a @ManyToOne annotation in the child and associate it with a field inherited from the parent? Is there some other way to do this I am overlooking?

3) How does one persist user-types or custom-types using EJB3? That is, if one of my POJO properties is of type URL or MyCustomClass written by some 3rd party and I cannot mark it up using EJB3 or extend it, how am I supposed to be able to persist it? Hibernate can do this, can EJB3?

More questions to come if the above are answered

Thank you,
Gili
[ August 21, 2006: Message edited by: Gili Tzabari ]
Hi,

I'm trying to improve the server-side caching filter found here: http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html?page=3

by making it cache the response headers so when the page is hit from the cache, it'll get the exact same response. The problem is I don't see a portable way to get at the underlying response headers when implementing a ServletResponseWrapper.

How is one supposed to do this? Is there a better preexisting server-side caching filter in existance? This seems like a pretty common-place problem.

Thanks,
Gili
19 years ago
Hi,

Is there a way to configure Tomcat to send out expiration headers for PNG images? I can't seem to find this anywhere in the documentation. How does one do this?

Thanks,
Gili
19 years ago
Hi,

Can someone please help with this?

http://forum.hibernate.org/viewtopic.php?t=939505

I've posted a test-case at the bottom of the page and I'm utterly stuck

Please help.
Gili
I'm trying to ensure nesting: that is, "if" and "else" may only be used within "condition", otherwise throw an exception.

Gili
19 years ago
JSP
I don't understand. What does scriptlet support have anything to do with nested classes? That is, if I wanted to implement <if> <else> tags inside a <condition> enclosing tag, why wouldn't I be able to do this using .tagx files?

Gili
19 years ago
JSP
Ben,

I know how to getParent() from within a tag Object, but what I meant is, how do I do the same from witin a tag file (that is .tag and .tagx files)? I can't seem to find a way.

Gili
19 years ago
JSP
Anyone have any idea?

Gili
19 years ago
JSP
This will likely work, thank you! Unless I reply again, you can assume I got it working.

Gili
19 years ago
JSP
I just flipped through the specification. It doesn't seem to discuss this matter at all. The only thing that *might* help is that tag files have access to a bunch of implicit variables including JspContext but I don't see how one can use any of them to find the enclosing tag. They all seem to operate on JSP concerns, not tag concerns.

Gili
19 years ago
JSP
I am not aware of any manual for tag files. What is your source?

Gili
19 years ago
JSP
Hi,

Is it possible to getParent() to get the parent tag from within a tag file? I have a tag that should only be used within a specific parent tag and I want to ensure this somehow. Any ideas?

Thanks,
Gili
19 years ago
JSP
Hi,

I'm using JSP tag files (.tagx more specifically) and I want to execute close when my tag is closed. That is, given:

<MyTag>
someBody
</MyTag>

I can already execute code on <MyTag>, but how do I execute some other piece of code for </MyTag>?

Thanks,
Gili
19 years ago
JSP
Ok, the situation is worse than I had originally thought. My previous post is incorrect.

I can't get FindClass() to work within the native code no matter what I do. I can invoke FindClass() within some Java native method, it works, then a couple of moments later I invoke the same thing from within a non-Java native method and then it fails.

When I say "Java native method" I am refering to a method that is defined using the "native" keyword and implemented in C++. Whereas "non-Java native method" is some function I declare within my C++ code that has no corresponding method in a Java class.

I am stuck...

Gili
19 years ago
I should clarify:

- I have method JavaLoadClass() which loads the class from pure Java code
- I have method NativeLoadClass() which is a native function called by a native thread and it attempts to load the class as well

- If I invoke JavaLoadClass() from a Java thread, then NativeLoadClass(), it works.
- If I invoke NativeLoadClass() it fails
- If I invoke JavaLoadClass from the native thread, then NativeLoadClass(), it still fails.

The problem seems to have more to do with the native thread than it does with JNI's FindClass(). My code invokes Thread.setContextClassLoader() to ensure that both the native and Java thread use the same class-loader and JavaLoadClass() uses Thread.currentThread.getContextClassLoader().loadClass() to load the class.

This behavior seems highly problematic to me because it implies that I have to predict ahead of time what classes my native code will be loaded and pre-loading them within some Java thread.

Gili
19 years ago