This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!

Rowan John

Greenhorn
+ Follow
since Oct 12, 2003
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 Rowan John

Hi,
the javax.ejb.EntityContext interface defines the isCallerInRole(String) and getCallerPrincipal() methods. However, I need to know the callers role, how would I get this?

many thanks,
Rowan
Kyle,
thanks for your reply.
Our application has multiple types of clients, ie browser and web services for starters, so I was hoping to write a couple of login modules to authenticate the users of these clients?
Given that Websphere v5 does support JAAS and that JAAS is part of the j2ee 1.3 spec, why would I use Websphere's inbuilt form-based authentication over JAAS?

thanks again,
Rowan

PS I'II look into your book...
16 years ago
Hi,
I have a few basic questions. We are developing a typical application using Websphere 5.0 that has both a web tier (eg Struts) and an EJB tier.
a) We plan on using form-based authentication (with SSL) -- can we use JAAS to authenticate the user against IBM Directory Server? Which approach would I use to achieve this, ie integrate JAAS with Struts or use form-based custom authentication or is their some other approach that is better?
b) Once the user is authenticated in the web tier and they make a call into the ejb tier, I assume the security context passed in means that they arent re-authenticated via JAAS again in the ejb tier?
c) Does JAAS have to be setup separately for both the web and ejb tiers?
d) Given that both the web and ejb tier have their own deployment descriptors is their anyway to consolidate the information, or does this have to be duplicated in each deployment descriptor?

many thanks,
Rowan
16 years ago
Hi,
I have a few basic questions. We are developing a typical application using Websphere 5.0 that has both a web tier (eg Struts) and an EJB tier.
a) We plan on using form-based authentication (with SSL) -- can we use JAAS to authenticate the user against IBM Directory Server? Which approach would I use to achieve this, ie integrate JAAS with Struts or use form-based custom authentication or is their some other approach that is better?
b) Once the user is authenticated in the web tier and they make a call into the ejb tier, I assume the security context passed in means that they arent re-authenticated via JAAS again in the ejb tier?
c) Does JAAS have to be setup separately for both the web and ejb tiers?
d) Given that both the web and ejb tier have their own deployment descriptors is their anyway to consolidate the <security-role> information, or does this have to be duplicated in each deployment descriptor?

many thanks,
Rowan
16 years ago
I've moved from JBoss to Websphere 5.0. One thing that Jboss has is an interceptor stack so that every EJB method invocation will get handled by every interceptor in the stack before it reaches the destination EJB. My questions are:
1) Does Websphere provide a similiar feature?
2) If so, if the destination EJB will initiate a new transaction are these interceptors part of that transaction, or do they have no transactional context?

thanks in advance,

Rowan
16 years ago
Kyle,
using the ejb-local-ref assumes that the servlet and ejb containers are running on the same VM. Would your solution still work using the <ejb-ref> tag if they were running on separate VM's?
Also, using the <ejb-ref> or <ejb-local-ref> element eliminates namespace collisions. How would this be solved if the client was not a struts action handler, but instead a standalone java application?

thanks,
Rowan
I realize that synchronizations are bottlenecks, but my question is:
a) Does the servelt container spwan new instances of Servlets to handle concurrent requests (like EJB stateless session beans)?
b) Is is considered bad programming practice to not synchronize the methods of the Servlet if the methods arent using any instance variables?

thanks,
Rowan
16 years ago
Hi,
The answer to my question is bound to be in the spec, but I couldnt find it there. So, if I deploy an ear with 2 jar files with entity beans, such as:
my.ear
a.jar
b.jar
where a.jar has the Order entity bean and b.jar has the Orderline entity bean can I define a CMR between the Order and OrderLine entity beans?
Thanks,
Rowan
Bill,
EJB's are single threaded, hence only one method invocation can be executed on an EJB at a time. Therefore, as previously mentioned the Container can spawn multiple instances of stateless session beans to handle multiple client invocations.
The term stateless simply means theres no affinity between method invocations from a client to stateless sb. But, just like any java object its can have state, but its not associated to any single client.
hope this helps.
Rowan
Hi,
I have a process that lends itself nicely to the state pattern. However, in my case I have 2 very general concerns regarding its implementation:
a) The number of polymorphic methods I have in the base class is steadily growing, and I'd prefer to keep this interface nice and succinct. Is there any pattern someone could point me to regarding this?
b) I'm concerned that some of the state instances methods will become god-like. Once again is there a pattern I could look to regarding this?
thanks in advance,
Rowan
Hi,
I was wondering whether the Servlet Container spawns instances of servlets (ie the Struts Servlet Controller) to handle http requests much like an EJB Container does with stateless session beans? I'm assuming it doesnt due to the HTTP session object?
If the Servlet Container does not spawn new instances of a Servlet Controller and you synchronise your servlets methods this to me would become a bottleneck to the application?

thanks in advance,

Rowan
16 years ago
Hi,
we are about to start a new project using websphere 5 and I'm wondering whether anybody has used xdoclet to generate the EJB meta-files, (eg local/remote/home interfaces, ejb-jar.xml, etc)? If not, what other options are there with WSAD to automate the generation of these EJB meta-files?

thanks,
Rowan
17 years ago
Hi,
I would like to know why one would use a stateless session bean rather than a http session to track the 'session' of a browser based user? The only reason I can think of to use a stateless session bean is if I want to persist session-related information to a database.
Are there any other reasons, or is there something I'm missing?

thanks in advance,
Rowan
17 years ago
Hi,
we are looking to migrate our application to Websphere 5, and I have a quick question that I havent been able to find the answer to on the internet.
Does Websphere 5 provide any 'read-ahead' strategies which gets around the 'n+1' problem? If so, could you point me to some link which describes it and the version of Websphere it is in, ie WAS, WAS-ND, etc?

thanks,
Rowan
17 years ago