Win a copy of Terraform in Action this week in the Cloud forum!

roul ravashimka

Ranch Hand
+ Follow
since Mar 16, 2004
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 roul ravashimka

front controller

Hope this helps,

Roul
17 years ago
thanks Kyle,
And if we would use a service locator, the method getInstance() and the cache must be synchronised, because all the threads use the same service locator.
Do you agree?
Thanks,
Roul
Hi all,

are all EJB's handled by one thread, or does every EJB has it's one thread?
Thanks,
Roul
At this time i'm learning to work with togethersoft, but i have some problems with it.
Togethersoft knows J2EE patterns and you can f.i. add automatically a value object assembler to an entity ejb.
But i want to know how i can use the other patterns. Is it possible to select some business methods of some ejb's and add those automatically to a session facade?
Or if i add a business delegate, how can i automatically add the methods exposed to it in the business delegate?
Or if i add or change a business method in a session ejb, is it possible that the session facade and business delegate follow?
Does anyone have some experience with togethersoft?
Thans for reading,
Roul
hi,
what's the difference of a dto assembler and a value list handler? They both produce a composite DTO, but a value list handler executes the query on a database, by using a DAO.
BTW, is a Fast lane reader the same as a value list handler?
Thanks,
Roul
hi,
A EJB can be deployed and work as a standalone component.
A JavaBean can't be deployed, it's a part of a bigger system. This bigger system can be run. Think of it as a helper object.
Grz,
Roul
hi,
can i use a dtoAssembler to return all values from one table in my database as a 'big dto', or return the values of a find-method. Which means wrap multiple rows as one object.
Or is an assembler only used to get data from 2,3,... different tables of a database which is related to eachother and combine it as composite DTO. Or in other words, combine one row of each database to one big object.
Or doesn't it matter?

Thanks,
Roul
Thanks Lasse,
suppose you're in a certain project where patterns are used.

Would you think it's reasonable of doing tests of the patterns?
Such as memory, time, ...
I would rather look at the components around the patterns. By adding patterns, layers are added. Does this have a negative influence? I'ld say no.
Suppose you've got a compex system of EJB's, you could use some facades to loose the view to the complex subsystem and you add a layer.
What is more important, the nagetive side of adding a facade(adding a layer, code,...), or something possitive which hide a complex subsystem?
I'ld say the possitive: get lost of the complex subsystem.
What do you think?
Roul
17 years ago
thanks Stan James,
So it looks Floyd combines to strategies in one.

Hey, there's Floyd's book - unopened - on my desk!


Unopend because you don't got the time, or because you don't like what he' saying?
Roul

Pass a POJO command to the server which then executes the command


if the server executes the command, the execute method could use local interfaces?
If you follow the design of Floyd Marinescu, there's a router at in the presentation layer which sends the command to a server in the ejb-layer.
This server has only one method which can execute all commandx. The code within de command'sexecute method could use local interfaces because it is executed at ejb-layer.
roul
hi,
i just take a look at a command used in a ejb command.
They use the remote interface in the execute method of the command. I thought that the command was executed at ejb-layer, so there's no need for a remote interface, you could use local interfaces.
What do you think about this?
Greetings,
roul
shouldn't the getInstance method be synchronised?
this is the data access code:
public EJBLocalHome getLocalHome(String jndiHomeName)
throws ServiceLocatorException {
EJBLocalHome home = null;
try {
if (cache.containsKey(jndiHomeName)) {
home = (EJBLocalHome) cache.get(jndiHomeName);
}
else {
home = (EJBLocalHome) ic.lookup(jndiHomeName);
cache.put(jndiHomeName, home);
}
}
catch (Exception e) {
throw new ServiceLocatorException(e);
}
return home;
}
public EJBHome getRemoteHome(String jndiHomeName,
Class className)
throws ServiceLocatorException {
EJBHome home = null;
try {
if (cache.containsKey(jndiHomeName)) {
home = (EJBHome) cache.get(jndiHomeName);
}
else {
Object objref = ic.lookup(jndiHomeName);
Object obj = PortableRemoteObject.narrow(objref
, className);
home = (EJBHome) obj;
cache.put(jndiHomeName, home);
}
}
catch (Exception e) {
throw new ServiceLocatorException(e);
}
return home;
}

Sure.


thanks lasse
i can see there are about 50.000 instances created on startup, this number falls back to 17.000 and goes further down until it levels out.
also which instance creates another and the used memory.
Can it also see when the instances create each other?
17 years ago
so in the ejb-layer, you've got to use a hashmap wrapped in a synchronised map.
while in the presentation layer, when you work with for instance struts, it is not nessecary to do this. because all requests(of the same type) create a new thread.
If two request of the same type arrive, they are handled by the same thread(one after another). --> can not give no accessing problem.
If two requests of a different type arrive, then you've got two threads are created. --> no accessing problem
(If you suppose the scoop is request)
Is this correct?
Roul
hi,
is there a difference between a Value List Handler and a Fast Lane Reader?
As I get it right, they both do the same.
How do you guys think?
Roul