Philippe Desrosiers

Ranch Hand
+ Follow
since Mar 29, 2006
Montreal
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 Philippe Desrosiers

This is a crosspost from the EJB forum.

If I annotate my session bean like that:

and deploy it in Webglogic 10, i get access to the remote interface with:


that works fine, but is there an alternative to define
a jndi name with annotations, without the full qualified classname of the remote interface?

so I want to have something like:


Reason being that at runtime, the client will need to be able to get the service out of JNDI without actually knowing the implementation (in this case, MyServiceBeanImpl or a Proxy) that is being returned (and hence the FQCN).

Google and friends seems to indicate that there may be a way to do this using ejb-jar.xml or weblogic-ejb-jar.xml, but So far it all looks like a cross between undocumented and incomprehensible. I'd rather do this with straight annotations, but I'm open to XML examples, if anyone's got 'em.

thanks!
8 years ago
If I annotate my session bean like that:

and deploy it in Webglogic 10, i get access to the remote interface with:


that works fine, but is there an alternative to define
a jndi name with annotations, without the full qualified classname of the remote interface?

so I want to have something like:


Reason being that at runtime, the client will need to be able to get the service out of JNDI without actually knowing the implementation (in this case, MyServiceBeanImpl or a Proxy) that is being returned (and hence the FQCN).

Google and friends seems to indicate that there may be a way to do this using ejb-jar.xml or weblogic-ejb-jar.xml, but So far it all looks like a cross between undocumented and incomprehensible. I'd rather do this with straight annotations, but I'm open to XML examples, if anyone's got 'em.

thanks!
I have an existing ANT build file that uses the wlDeploy task to deploy my EAR to a Weblogic instance. Now I'm being asked to move all our build processes over to Maven (which initiative I fully support!), but can't quite figure out how to migrate this one task. I've looked into Cargo, but can't really decipher the documentation in a way that would let me do a sort of one-to-one migration from my Ant wlDeploy task into a Maven POM.

Has anyone had any experience with this?
8 years ago
I'm trying to explore a couple of templating solution frameworks (Tiles 2, Facelets, etc). But I'm having trouble understanding what is the functional difference between, say, a Tiles-based solution, and just using a bunch of JSP includes. Can someone give a bulleted list of what, exactly, Tiles does that couldn't be accomplished with a JSP include? Advantages related to other frameworks (such as Struts) don't count! I'm looking for a platform-agnostic solution (ie: something that doesn't tie me down to Struts, or JSF, or Spring Web flow or whatever).

thanks!
8 years ago
I ended up using getSession().createQuery(hql).executeUpdate() instead.

hope this helps...
Bnaresh, my man! Thanks so much, this is pretty much exactly what I was looking for!

So that's "part one" of the problem solved. Part two is "scanning" a particular JAR file for any classes that implement a specific interface. I'm sure I've asked that question before, though, somewhere in the forums. Just have to try and find it now....


thanks again!
9 years ago
Thanks William!

Letting users run arbitrary code on your server sounds like a recipe for security disaster to me - you may find yourself originating spam email or having your files deleted.



I totally agree. This is more an admin console scenario, where the user would be running arbitrary code on their own server :-)
9 years ago
Not sure this is the right forum for this question, but here goes...

I need to develop a web app (Spring MVC, if you must know, but the question is not spring-specific), that will allow a user to upload a JAR file that they have developed. The servlet needs to scan the JAR for compatible classes that implement a specific "plugin" interface, and add those classes to it's classPath. Essentially, this should allow the user of the site to upload, enable, and configure plugins.

Is this possible? And if so, how can I add these uploaded JARs to the classpath for the webapp in a way that they won't be deleted next time I deploy my WAR file (ie: I can't store the uploaded JARs in the WEB-INF folder, etc.)?

thanks,
9 years ago
heheh. Once again. I'm dumb (in case there was any doubt). The RoutingRule alias was "rr", not "r".

Pays to re-read your code once in a while.
Well, dumb I may be, but it seems this issue has reared it's head again. I am once again receiving the "Invalid Path" exception, but this time the HQL looks good to me...



Any ideas? Am I doing something wrong here?

Rob Prime wrote:I copied your code exactly as it is, and for me it printed "results: WARMER tamales".



Yep. That's the correct result. The comments in the code were wrong (typo). Sorry.
9 years ago
Can anyone tell me how to get the replacement text for each matcher capturing group?

example: I want to replace "WARM tamales" with "WARMER tamales", using the search pattern "(HOT|COLD|WARM|)" and the replacement pattern "$1ER". This works fine, but I also want to be able to discover what was the final replacement text used for capturing group 1 (eg. in this example, it would be the text WARMER, which replaced the original text WARM).

Does this make sense? Can it be done?

PLEASE HELP!

edit: oh yeah, here's some code...


edit: Fixed the comments in the code (thanks Rob!)
9 years ago
BUMP!

Almost a year later, but still bumping. Has anyone figured out how to use rlike in HQL queries in Hibernate3?
Well, the beautiful sound of crickets is gratifying, but I have trouble believing that no one in the history of the universe has ever attempted an HQL Update query before. Seriously? no one?

Well, consider this a bump, then, I guess.
I need to code a TLS client application that will connect to the same host server using multiple simultaneous sockets, with a different Client Certificate for each connection.

Additionally, web users will need to be able to upload their .p12 encrypted certificates to the web server, and the server needs to be able to decrypt the certificate and add it to it's local keystore (or identitystore, or truststore, or whatever it's called).

In case you can't tell, I'm completely oblivious to TLS / SSL protocol and certificates and whatnot. Can anyone point me at some sample code that does this? Everything I've seen uses some combination of system properties for the keystore stuff. I need to be able to add client certificates at runtime, from an arbitrary path on disk.

Any ideas?