Dan Johnsson

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

Recent posts by Dan Johnsson

Originally posted by Linda Rising:
There are so many principles of XP or the other Agile Methods whose goal it is to get us to work well together. PP is probably at the top of that list. I'm not sure it's necessary to adopt this practice if it doesn't work well for you *and* if you communicate with your team members and do some kind of code review./.../



In my opinion, the fast feedback cylcle is the heart of pair programming. I e feedback cycle taken to its extreme (hence the name of the process).

However, another of the agile core values are Adaption; to constantly modify your tools and processes to get a better performance.

So having a fast feedback cycle by sitting a meter from a collegue, who you constantly exchange id�as with, is not pair programming in letter, but well in spirit.
We are attempting to add NTLM authentication to our webapp (running on Tomcat 5.0 inside JBoss 3.2.5). Our attempt is to add an extra authenticating valve, which perform NTLM authentication and thereafter registers the user to Tomcat.

However, we do not get as far as the NTLM, but get stuck earlier.

It seems like an authenticating valve cannot be added at <Host> level, but has to be defined on each <Context>. Is that correct?

We also tried to to add the valve to <DefaultContext>, but got an NoSuchMethodError for misssing "setValve", which we interpret that the DefaultContext is not a full-fledged context. Is that so?

Anybody with insights they want to share?
20 years ago
Extra info: We are using JBoss 3.2.5, and deploy everything as exploaded ear/war:s.
20 years ago
I am trying to add a (self-implemented) Valve to a JBoss+Tomcat.

I try to do this by adding the <Valve> to the <Host>. However, it seems to me as a autenticator valve (it is a such), must be added to a <Context>.

Is that so?

When I try to add a <Context> I do not know how to set up the docBase. The docBase should be relative to the <Host> appBase, but I cannot find a such in my tomcat.sar/server.xml.

Can someone shed light over this mystery to me?
20 years ago
Really nice article. In the summary it catches in one sentence the crusial insight to get a nice structure of the web tier.

I think it is worth pointing out that the philosophy is not restricted to JSP 2.0, it is even more important if you want your structure to make sence if you are restricted to, say JSP 1.2 + Struts.
20 years ago
JSP

Originally posted by Rajesh:
Hi All,

I have a requirement based on the delivery of the JMS Message condition,
I have to commit another transaction. How enable transactions with JMS.

Regards

Rajesh



[Dan guessing] If the action sending the message cannot commit until the message have been properly handled (by the reciever), you have a (de facto) synchronous transfer. If so, JMS might not be the proper tool.

Originally posted by Kyle Brown:
IMHO, XML is a TERRIBLE, TERRIBLE idea for inter-layer communication. /.../ Yes, it's great for allowing programs to communicate with each other (when talking on a wire that is) but there's no good reason I can think of to ever use it instead of DTO's inside your program.
Kyle



I agree and would like to quantify it even further.

XML might be a good way to exchange information between systems with very loose coupling and infrequent/non-critical communication. However, between tightly integrated systems within an enterprise it is often better to use a non-text format.

/Dan

Originally posted by chuck keuper:
Here is the rest of the code from the entity test client main.
/.../



Have you written this code yourself, or have you had it generated for you?

If the former: please slim the code to a minimal version with the same problem.

If the latter: do you understand the code you had generated for you? If so, please slim the code to a minimal version. If not: try to write the code yourself at least once.

/Dan

Originally posted by Si Soft:
hi ranchers,
i am running a stateful session bean, when i run the program, after constructor setSessionContext() is called two times and then ejbCreate() is called. when i again instantiates a session bean object, then setSessionContext() is called 3 times and then for further instances it is always called thrice.

so why setSessionContext() is behaving lie this.



Sounds very strange, not what I would expect.

Can you reconstruct the problem with a very slimmed version of your bean?

What app-server do you use?

Originally posted by Bhagyashree Jayaram:


Yes you need to add the ejb-ref for the first ejb indicating a reference of the second ejb in the first ejb.



A clarification why it is so:

The EJB container make no difference between code that is "in the bean" and in other classes called by the bean. The "helper class code" could have been inlined in the bean class and the container would see no difference.

So, even if code is broken out of the bean-class to helper classes, the code is nevertheless "in the bean".

Dan

Originally posted by Ramakrishnan thiyagarajan:
Hi,
U should import javax.rmi.* bcos in EJB1.1 supports rmi-iiop protocol it does not allow casting.actually corba supports rmi-iiop protocol.



1) I do not see how the code could have worked without importing javax.rmi.PortableRemoteObject: it have obviously compiled.

2) What difference should importing or not make a difference during runtime? Import is a pure compile-time feature.

Originally posted by Douglas Kent:
InitialContext ctx = new InitialContext();
java.lang.Object ref = ctx.lookup("MySessionEJB");

java.lang.ClassCastException

Ideas?[/QB]



Obvoiusly 'ref' referred to an object of some other type. It could be that your home is deployed under another name (doublecheck deployment descriptor) or that your app-server throws on a prefix (such things are not unheard of).

Check out the class of the 'ref' object (ref.getClass().getName()), it might give a clue.

Originally posted by Nagesh Babu Sunkara:
Hey all,

how do we achieve internationalization in java without struts.



I suppose the question is restricted to Java in a web environment.

One cool feature is that JSPs can be internationalized be suffixing the name with the locale. Try out writing three JSPs

cool.jsp
cool_en.jsp
cool_en_UK.jsp

and call them using different locale settings in your browser.

Originally posted by Lasse Koskela:
There's no doubt that HTTP is less than perfect, but it's good enough to support most of what we need and because it's so ubiquitous, there's little reason not to use it.



That might well be (i e "another discussion"), but I do not see the claimed beauty in it.
20 years ago
I just want to issue a warning.

If you end up generating an entire object structure from the database, you will probably end up with something that is not very OO, and thus not very suited for maintaining in Java.