1

私は Maven ベースの J2EE プロジェクト構造を持っています

Customer (root pom)
   |
   |------ WebTier (JSF 2/Primefaces)
   |
   |------ BusinessTier (EJB 3.*, interfaces, interface impl)
   |
   |------ PersistenceTier (JPA 2)
   |
   |------ CustomerEar

基本的なルーチンを処理するための新しい Java クラスが必要であることがわかりました。Utilities は BusinessTier からも使用される可能性があるため、この Utility クラスを WebTier の下に配置することはお勧めできません。独立したJavaプロジェクトを作成し、必要なクラスを実装し、このjarを耳に含めることは「ベストプラクティス」ですか??

4

2 に答える 2

0

based on my experience , i recommend to have separate project folder for utility and include this as jar where ever is required

advantages are

  1. easy maintenance, since you need to change code once .

  2. plugin & unplug when ever you need.

  3. you can have this as common and utilize for other projects.

for instance

apache string util

http://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html

bean util

http://commons.apache.org/proper/commons-beanutils/

于 2013-10-25T10:25:20.513 に答える