Michael Couck

Ranch Hand
+ Follow
since Nov 15, 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 Michael Couck

Hi,

Sorry to dredge up this old post but you can use Hudson and Serenity(http://wiki.hudson-ci.org/display/HUDSON/Serenity+Plugin) for code coverage, complexity, dependency, abstractness and distance. And of course FindBugs plugs in to Hudson as well, the two together will give you more than enough metrics to judge the code quality.

Hope this helps,
Michael
11 years ago
I can't really help you with Emma, but you can try an integration server like Hudson and use a code coverage plugin like Serenity(http://wiki.hudson-ci.org/display/HUDSON/Serenity+Plugin), this will give you not only coverage but complexity, dependency, abstractness and distance metrics.

Hope this helps a little,
Michael
11 years ago
Hi Graham,

Thanks for that, I think I am going to give it a twirl in fact!

See ya

Michael
14 years ago
Yep, read your jar loading problem which is related, Graham.

No solution there, JBoss finds two objects with the sme name in two different but identical applications and doesn't like that at all.

The light at the end of tunnel has been turned off. I will gracefully bow out of this line of thinking, and follow the less travelled road. Specifically I will reconfigure the core, which means decoupling the relationships between the Pojos and the tables and of course each other.

I owe, I owe, it's off to work I go.

Mike
14 years ago
Hi,

I would like to deploy two identical applicaitons on one instance of JBoss. One for development connected to it's own datasource, and one for production connected to the production datasource. The trouble is of course is that the session beans all get the same JNDI string.

I've looked at two instances of JBoss on the same machine, looks messy, other than the cloned ip for the machine. Also looked at swapping the datasource on the fly, but that means development and production can't run at the same time, which is not an option. And of course two virtual operating systems on the same machine, not the VMWare type but the partition type, which also seems messy.

I suppose that two ears seems to be the best option. Trouble is that how will the client connect either to application one or application two bean if they are both called ApplicationBean? This seems like a conundrum.

Has anyone done this? Please share your wisdom great sage.

Mike
14 years ago
Hi,

Is there some way of getting a list of cll the clients connected to the server, a fat client connecting via a session bean or the like. I need to check who is connected at a particular point. I see tht there are ways in the other servers, WebLogic and WenSphere but I don't seem to find the same in the documentation for JBoss.

Thanks in advance

Michael
14 years ago
Hi Mark,

Thank you very much for the word of reason, much appreciated!

Regards

Michael
14 years ago
Hi Mark,

Thanks for the word or reason!

I saw the documentation covering open the session, do your stuff then close it. But I was under the impression that JBoss would do that if the MBean is used?

Could you please verify for me that if we in fact don't use the MBean that JBoss will not handle the session, and that if we do use the MBean that JBoss will handle the transactions in Hibernate, i.e. close the session and if necessary rollback?

The reason is that we are not closing the session anywhere at the moment! The result is that after about 12 hours there is a socket exception, here is the stack trace, long but seemingly obvious what the problem is, namely that MySql is closing the connection after a while because we don't do it ourselves:



In any event I suppose that we will have to go the annotation route and generate the HBM files.

Kind regards

Mike
14 years ago
Hi,

I have three questions that are related, kind of like a Nassi-Schneidermann diagram, if one solution doesn't work then the next path is evaluated.

We have a standalone Hibernate integration in JBoss, i.e. we do the Pojos then the tables by hand, then map everything in a hibernate.cfg.xml. Now we need to switch to the MBean. But now we need hbm.xml files, which we don't have of course. These get generated by the Hibernate Plugin, but from the database, which doesn't match the actual persistance classes we so diligently did by hand.

The questions are:

1) Is Hibernate in the transaction with JBoss if the MBean for the SessionFactory is NOT used? More specifically do you have to use the MBean if you want JBoss to manage the transactions, including closing the session and the connection to the database?
2) If we are NOT using the MBean in JBoss do we have to close the session ourselves?
3) Is there any way to configure the MBean with the hibernate.cfg.xml file rather than the hbm.xml files and the HAR file? We just can't generate the HBM files. No way.

Thanks in advance.

Regards

Michael
14 years ago
Hi daming,

Sorry about the long delay, don't look at these forums every day.

If I understand you correctly, your interface is:

And you don't want to break the method signature. But you can change some modifiers.
That is no problem, you can change the implementation of that method and include a "synchronized" modifier, no problem. But you said that you are synchronising on the list, that is also ok. Most of the people synchronised on the Data class, I think because it is easier. But synchronising on the list should be fine.

See ya

Michael
Hi Anton,

Looks pretty good to me.

I will say that it was not specifically mentioned in the spec that the create method was to be implemented. As it turns out I did, as well as the delete if I remember correctly, but I didn't expose these functions to the client, i.e. the gui, so just a book and search function. But the specs are slightly different.

Anyway, looks fine.

See ya

Michael
Hi Daming,

Don't worry about locking at the record level for each record, lock the whole list. The other threads can wait to read while you update a record. Locking at the record level is not necessary, so somehing like this, in the DB class, or the implementor:


I locked each record at the record level, and had a queue on the lists, and I lost marks, so keep it simple. Lock the whole list, modify, then unlock, simple. You don't have to have bullet proof code like DB2, and efficiency you don't have to worry about.

Hope this helps.

Michael
Gentlemen, thank you. I am clearly intellectually challenged.
To clear things up for any other would be misguided pilgrims the bundle of supprisingly marginal size (15 meg) in fact contains not only the server but the tool too, duly aquired at http://java.sun.com/j2ee/sdk_1.3/ .
Thanks Dale, the allusion was to the server being in the wrong family of products, congruent to the Shakespear import. I do find English to be a succinct, precise, simple and coluourful language when mastered, although it does lack the flowery detail of my own mother toungue, Dutch.
See ya
Michael
Hi Dmitry,
Thanks! I got that link, problem is that the deploytool is built into the Sun Studio IDE for that version, and the book uses the deploytool seperate. Not to worry I found a copy of a 1.4 JDK with the server and deploytool seperate on an old external backup hard drive I had lying around. This one is a little different but the tool is seperate, perfect. I would put it up on a site somewhere but I think Sun will have kittens if I start distributing their software, also I only have 50 meg on my own site and the JDK is 120 meg, which doesn't help. I think that a solution is necessary for guys that haven't got this. If you can think of somewhere to put a copy of this JDK for anyone else that needs it that would be great.
See ya
Michael
Hi,
Does anyone know where to get the Sun RI Server, only the server. I downloaded the Sun Studio not realising that it is the IDE + Server, and "The Good Book" has all the lovely deploy tool pics and things, not to be missed. The deploy tool is not included in the Studio version of the download, rather the IDE has some built in tool for deployment. Sun is trying to hide the 1.3 stuff again?
See ya
Michael