Hung Tang

Ranch Hand
+ Follow
since Feb 14, 2002
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hung Tang

Originally posted by Mark Spritzler:
If your domain objects are deployed in the AS and there is a JTA Transaction in progress, then when you call session.beginTransaction() it will join the JTA transaction automatically for you, nothing to do or see here. If there is not a JTA Transaction in progress when you call session.beginTransaction(), then Hibernate creates its own internal transaction.

Basically, it is hidden from you so you don't have to worry about it.


Hibernate uses JDBC Transaction when you don't specify hibernate.transaction.factory_class property.

For Hibernate to participate in JTA, you'll need to update hibernate.transaction.factory_class and hibernate.transaction.manager_lookup_class to the appropriate values.

Page actions are tied to particular view (i.e. page), and it only involves a single method.

Phase listeners are tied to the entire JSF life cycle, and you can pretty much build an entire framework, if you choose to, with this extension point.
16 years ago

Originally posted by Dudley Dawson:
With seam, doesn't every object in session have to be a stateless session bean?

No. Seam works fine with regular javabeans. I'm using the regular javabean model just fine.

Originally posted by Dudley Dawson:
And I believe that seam requires you to use a ubiquitous navigation/flow framework, correct?

"ubiquitous" ? Not sure what you mean by that.

You can use JSF navigation system or you can use Seam's navigation system which is much more flexible.
16 years ago

Originally posted by Dudley Dawson:
That is, the number of inputs on each page, and their range of valid values is entirely dependent on the user's current context. Anyone know of any other frameworks that make this easy?[/QB]

This is an extremely simple thing to do with JBoss Seam using their conversational model. You should take a look at their examples.
16 years ago
Look up on reflection and classloading.
16 years ago
Depends on your clients. If they don't know anything about sockets, then how could you "connect" to them?

If they are socket-driven, have them connect to a socket server, and include support for multi-casting in your server software.
Map is an interface whereas HashMap is an implementation. A good principle to follow is always design your software around the concept of interfaces so it'll protect you from harassment from your users when you make an underlying change to your software (in your case the implementation of Map used)
[ May 05, 2007: Message edited by: Hung Tang ]
16 years ago

please give me code if anyone has for this application.

Achalveer, here's a tip: no one is going to do your homework for you.

please read question first before answering.

<sarcasm>This will surely get you some help.</sarcasm>

Why don't you go do some research on your own and come back with some real results before mouthing off in the forums.
What is your requirement?

You want your web app to create and store signature?

Unless the hardware itself has built-in software to create the signature and submit it, it's going to be a difficult task. Like Ulf said, maybe there's a native API from the manufacturer that may allow you to access such services
[ April 03, 2007: Message edited by: Hung Tang ]
16 years ago

Originally posted by pradeep selvaraj:

Our client requires us to use 3DES to encrypt the files that we send to them. They want us to create certificates with encryption algorithm as 3DES with the hashing & receipt algorithm being SHA1.

I havent done much in security, my idea is that 3DES is like RSA. Am i correct? If so are there any tools to create certificates using 3DES?

A little late to reply so I'm not sure if I'm much help to you.

3DES is not like RSA. 3DES is an example of what they call symmetric-key encryption whereas RSA is an example of what they call public-key encryption. Public-key is often very useful for solving the key-establishment problem and for signing and verifying signatures and can work alongside with symmetric-key encryption.

Take a look at Java keytool for generating certificates.
16 years ago

Originally posted by Ulf Dittmer:
But sending unencrypted data over an encrypted channel is a different problem than sending encrypted data over an unencrypted channel.

What do you mean by "sending unencrypted data over an encrypted channel"?

Anyways, the goal is to setup up a secure channel for communication, which involves a shared secret(key) known to communicating parties to do data encryption/decryption. The biggest problem is establishing that very key securely (normally done over an insecure channel) and there are several solutions available with benefits/drawbacks. For example, you can call meet up with your buddy in an alley and tell him/her your secret. Of course, this solution isn't very scalable and that is why there are crypto tools out there to help address that problem.

Overhead is not much of a consideration, because you incur that whether your code does the encryption, or SSL does it.[/QB]

Of course overhead is something you need to consider. Depending on your application and your scalability requirements, you may not need SSL because it may be an overkill. If large-scale key establishment is not a concern for your application (often the case for very simple applications), then why incur the costs of using SSL when simple encryption/decryption using something like RC4 will do. Buying and getting certificates, setting them up, writing and testing code that use them all need to be considered. It's just not about performance. Infact there's probably little to be gain by not using SSL once the key-establishment part is done in the SSL protocol.
16 years ago
advantages and disadvantages for SSL/TLS


- you take advantage of the countless hours put into a mature API (many people actually use and depend on it) implementing SSL/TLS.
- SSL/TLS is a standard spec--proven protocol.

- overhead
16 years ago
<h:outputText value="#{messages['']}"/>
16 years ago

Originally posted by Silvio Esser:
Bridge pattern is another example.

I think you're not really understanding what is ioc. And no, it's not the bridge pattern or any other terms you like to toss out there.

You can always get JBoss. JBoss is just like Spring has lots of jar and XML files. The difference is that JBoss provides UI for configuration.

Have you ever used Spring at all? JBoss is an application server that provides enterprise services such as security, JNDI registry, class loaders, proprietary XML descriptors, jsp/servlet container (tomcat), EJB3, MQ for messaging, etc. etc. etc. spring don't come bundled with these services. instead, it provides support for many of them--that's the difference. Often many small to medium applications don't require these additional services and can live without the bloat of JBoss or any other application server. Do you ever compare the size of the lib folder in JBoss to that of spring? on mine, it's 21MBs(for jboss) and 2.5mb for spring. Spring has lots of jar? I only have spring.jar, and no other dependencies. Do you ever compare the level of quality in the documentation of JBoss to that of Spring?

Please get your facts straight. If in doubt, do some research on the topic before making erroneous conclusions.
[ February 23, 2007: Message edited by: Hung Tang ]

Originally posted by Silvio Esser:
I like to use the old names to describe old stuffs, like container, de-coupled, loosely-coupled, mediator, ...

hmm...container like Tomcat? mediator pattern? is this ioc? There's some literature written on ioc that you may want to read:

Loosely-coupled though, I agree to that extent.

Originally posted by Silvio Esser:
Another thing concerns me is that Spring is not 'light' anymore. It becomes
heavier and heavier, and even heavier than EJB.

Heaver than EJB huh? can you use EJB with Tomcat?