(empty log message)
@@ -27,9 +27,6 @@ | ||
27 | 27 | */ |
28 | 28 | public class JDBCTransactionManager extends TransactionManager implements JDBCConstants { |
29 | 29 | |
30 | - /** 接続定義名前空間 */ | |
31 | - private String namespace; | |
32 | - | |
33 | 30 | /** データベースコネクション */ |
34 | 31 | private Connection connection; |
35 | 32 |
@@ -38,11 +35,10 @@ | ||
38 | 35 | |
39 | 36 | /** |
40 | 37 | * コンストラクタ<br> |
41 | - * @param namespace 接続定義名前空間 | |
38 | + * @param getNamespace() 接続定義名前空間 | |
42 | 39 | */ |
43 | 40 | public JDBCTransactionManager(String namespace) { |
44 | - super(); | |
45 | - this.namespace = namespace; | |
41 | + super(namespace); | |
46 | 42 | } |
47 | 43 | |
48 | 44 | /** |
@@ -49,7 +45,7 @@ | ||
49 | 45 | * コンストラクタ<br> |
50 | 46 | */ |
51 | 47 | public JDBCTransactionManager() { |
52 | - this(null); | |
48 | + super(); | |
53 | 49 | } |
54 | 50 | |
55 | 51 | /** |
@@ -83,8 +79,8 @@ | ||
83 | 79 | } |
84 | 80 | try { |
85 | 81 | String suffix = ""; |
86 | - if (!StringUtil.isEmpty(namespace)) { | |
87 | - suffix += "." + namespace; | |
82 | + if (!StringUtil.isEmpty(getNamespace())) { | |
83 | + suffix += "." + getNamespace(); | |
88 | 84 | } |
89 | 85 | |
90 | 86 | boolean useDatasource = false; |
@@ -108,16 +104,16 @@ | ||
108 | 104 | |
109 | 105 | // トレースログ |
110 | 106 | if (useDatasource) { |
111 | - if (StringUtil.isEmpty(namespace)) { | |
112 | - log.output("FJDB00002", namespace); | |
107 | + if (StringUtil.isEmpty(getNamespace())) { | |
108 | + log.output("FJDB00002", getNamespace()); | |
113 | 109 | } else { |
114 | - log.output("FJDB00006", namespace); | |
110 | + log.output("FJDB00006", getNamespace()); | |
115 | 111 | } |
116 | 112 | } else { |
117 | - if (StringUtil.isEmpty(namespace)) { | |
118 | - log.output("FJDB00003", namespace); | |
113 | + if (StringUtil.isEmpty(getNamespace())) { | |
114 | + log.output("FJDB00003", getNamespace()); | |
119 | 115 | } else { |
120 | - log.output("FJDB00007", namespace); | |
116 | + log.output("FJDB00007", getNamespace()); | |
121 | 117 | } |
122 | 118 | } |
123 | 119 |
@@ -1,77 +0,0 @@ | ||
1 | -package org.phosphoresce.webcore.struts.annotation; | |
2 | - | |
3 | -import java.lang.annotation.Documented; | |
4 | -import java.lang.annotation.ElementType; | |
5 | -import java.lang.annotation.Retention; | |
6 | -import java.lang.annotation.RetentionPolicy; | |
7 | -import java.lang.annotation.Target; | |
8 | - | |
9 | -/** | |
10 | - * アクションメソッドアノテーション<br> | |
11 | - * <br> | |
12 | - * アクションクラスのイベントメソッドに付与して利用するアノテーションで、イベント処理挙動定義を行います。<br> | |
13 | - * アクションメソッドは必ずこのアノテーションが定義されている必要があります。<br> | |
14 | - * | |
15 | - * @author Kitagawa<br> | |
16 | - * | |
17 | - *<!-- | |
18 | - * 更新日 更新者 更新内容 | |
19 | - * 2010/07/19 Kitagawa 新規作成 | |
20 | - * 2012/07/04 Kitagawa 全体的に再構築 | |
21 | - * 2012/11/07 Kitagawa 編集済み状態クリアフラグ追加 | |
22 | - * 2012/12/07 Kitagawa トランザクショントークンチェックはディフォルト動作に変更 | |
23 | - *--> | |
24 | - */ | |
25 | -@Retention(RetentionPolicy.RUNTIME) | |
26 | -@Target({ ElementType.METHOD }) | |
27 | -@Documented | |
28 | -public @interface StrutsActionMethod { | |
29 | - | |
30 | - /** | |
31 | - * キャッシュフィールド反映タイプ列挙型クラス<br> | |
32 | - * | |
33 | - * @author Kitagawa<br> | |
34 | - * | |
35 | - *<!-- | |
36 | - * 更新日 更新者 更新内容 | |
37 | - * 2012/07/04 Kitagawa 新規作成 | |
38 | - *--> | |
39 | - */ | |
40 | - public enum ReflectFieldType { | |
41 | - /** フィールド反映なし */ | |
42 | - NONE, // | |
43 | - | |
44 | - /** 注釈フィールドのみ反映 */ | |
45 | - MARK, // | |
46 | - | |
47 | - /** 全てのフィール反映 */ | |
48 | - ALL, // | |
49 | - } | |
50 | - | |
51 | - /** キャッシュフィールド反映 */ | |
52 | - public abstract ReflectFieldType reflectCacheField() default ReflectFieldType.MARK; | |
53 | - | |
54 | - /** セッションタイムアウトチェックフラグ */ | |
55 | - public abstract boolean checkSesion() default true; | |
56 | - | |
57 | - /** トークンチェックフラグ */ | |
58 | - public abstract boolean checkToken() default false; | |
59 | - | |
60 | - /** ログインチェックフラグ */ | |
61 | - public abstract boolean checkLogin() default true; | |
62 | - | |
63 | - /** フォームバリデーションメソッド */ | |
64 | - public abstract String validate() default ""; | |
65 | - | |
66 | - /** バリデーションエラー時遷移ページ */ | |
67 | - public abstract String input() default ""; | |
68 | - | |
69 | - /** データベーストランザクション処理フラグ */ | |
70 | - public abstract boolean transaction() default false; | |
71 | - | |
72 | - /** 編集済み状態クリアフラグ */ | |
73 | - public abstract boolean clearEdited() default false; | |
74 | - | |
75 | - /** ウィンドウスクロールクリアフラグ */ | |
76 | - public abstract boolean clearWindowScroll() default false; | |
77 | -} |
@@ -1,29 +0,0 @@ | ||
1 | -package org.phosphoresce.webcore.struts.annotation; | |
2 | - | |
3 | -import java.lang.annotation.Documented; | |
4 | -import java.lang.annotation.ElementType; | |
5 | -import java.lang.annotation.Retention; | |
6 | -import java.lang.annotation.RetentionPolicy; | |
7 | -import java.lang.annotation.Target; | |
8 | - | |
9 | -/** | |
10 | - * アクションフォームアノテーションクラス<br> | |
11 | - * <br> | |
12 | - * アクションフォームクラスに対して付与して利用するアノテーションで、フォークの性質を定義します。<br> | |
13 | - * | |
14 | - * @author Kitagawa<br> | |
15 | - * | |
16 | - *<!-- | |
17 | - * 更新日 更新者 更新内容 | |
18 | - * 2010/07/19 Kitagawa 新規作成 | |
19 | - * 2012/07/04 Kitagawa 全体的に再構築 | |
20 | - *--> | |
21 | - */ | |
22 | -@Retention(RetentionPolicy.RUNTIME) | |
23 | -@Target({ ElementType.TYPE }) | |
24 | -@Documented | |
25 | -public @interface StrutsActionForm { | |
26 | - | |
27 | - /** アクションフォームスコープ */ | |
28 | - public abstract String scope() default "request"; | |
29 | -} |
@@ -67,7 +67,7 @@ | ||
67 | 67 | public abstract String input() default ""; |
68 | 68 | |
69 | 69 | /** データベーストランザクション処理フラグ */ |
70 | - public abstract boolean transaction() default false; | |
70 | + public abstract StrutsTransaction transaction() default @StrutsTransaction; | |
71 | 71 | |
72 | 72 | /** 編集済み状態クリアフラグ */ |
73 | 73 | public abstract boolean clearEdited() default false; |
@@ -0,0 +1,34 @@ | ||
1 | +package org.phosphoresce.webcore.struts.annotation; | |
2 | + | |
3 | +import java.lang.annotation.Documented; | |
4 | +import java.lang.annotation.ElementType; | |
5 | +import java.lang.annotation.Retention; | |
6 | +import java.lang.annotation.RetentionPolicy; | |
7 | +import java.lang.annotation.Target; | |
8 | + | |
9 | +import org.phosphoresce.webcore.transaction.TransactionManager; | |
10 | + | |
11 | +/** | |
12 | + * トランザクションアノテーション<br> | |
13 | + * <br> | |
14 | + * アクションメソッドアノテーションから利用されるアノテーションで利用するトランザクションクラスを定義します。<br> | |
15 | + * | |
16 | + * @author Kitagawa<br> | |
17 | + * | |
18 | + *<!-- | |
19 | + * 更新日 更新者 更新内容 | |
20 | + * 2010/07/19 Kitagawa 新規作成 | |
21 | + * 2012/07/04 Kitagawa 全体的に再構築 | |
22 | + *--> | |
23 | + */ | |
24 | +@Retention(RetentionPolicy.RUNTIME) | |
25 | +@Target({ ElementType.METHOD }) | |
26 | +@Documented | |
27 | +public @interface StrutsTransaction { | |
28 | + | |
29 | + /** トランザクション管理クラス */ | |
30 | + public abstract Class<? extends TransactionManager> transactionClass() default TransactionManager.class; | |
31 | + | |
32 | + /** トランザクション接続定義名前空間 */ | |
33 | + public abstract String namespace() default ""; | |
34 | +} |
@@ -9,6 +9,7 @@ | ||
9 | 9 | import java.util.Map; |
10 | 10 | |
11 | 11 | import org.apache.struts.action.ActionForward; |
12 | +import org.hibernate.annotations.Table; | |
12 | 13 | import org.phosphoresce.commons.util.ReflectionUtil; |
13 | 14 | import org.phosphoresce.commons.util.StringUtil; |
14 | 15 | import org.phosphoresce.webcore.ConfigName; |
@@ -45,6 +45,7 @@ | ||
45 | 45 | import org.phosphoresce.webcore.struts.util.StrutsAnnotationUtil; |
46 | 46 | import org.phosphoresce.webcore.struts.util.StrutsUtil; |
47 | 47 | import org.phosphoresce.webcore.transaction.TransactionContainer; |
48 | +import org.phosphoresce.webcore.transaction.TransactionManager; | |
48 | 49 | |
49 | 50 | /** |
50 | 51 | * アクション処理ディフォルトクラス<br> |
@@ -1030,7 +1031,7 @@ | ||
1030 | 1031 | } |
1031 | 1032 | |
1032 | 1033 | // アクションメソッドアノテーションにトランザクション必要フラグが設定されている場合に処理 |
1033 | - if (actionMethod.transaction()) { | |
1034 | + if (!actionMethod.transaction().transactionClass().equals(TransactionManager.class)) { | |
1034 | 1035 | actionContext.getTransactionContainer().open(); |
1035 | 1036 | } |
1036 | 1037 | } |
@@ -1068,7 +1069,7 @@ | ||
1068 | 1069 | // アクションメソッド実行 |
1069 | 1070 | Method method = StrutsUtil.getActionMethod(actionPath); |
1070 | 1071 | log.output("FSTR11006", method.getName()); |
1071 | - Object value = method.invoke(this, actionContext.getCastedForm(), actionContext.getWindowSessionContainer(), actionContext.getServletContainer()); | |
1072 | + Object value = method.invoke(actionContext.getAction(), actionContext.getCastedForm(), actionContext.getWindowSessionContainer(), actionContext.getServletContainer()); | |
1072 | 1073 | Forward forward = (Forward) (value == null || ((Forward) value).getPath() == null ? null : value); |
1073 | 1074 | actionContext.setForward(forward); |
1074 | 1075 | log.output("FSTR11009", forward); |
@@ -1081,7 +1082,7 @@ | ||
1081 | 1082 | throw new StrutsProcessInternalException("FSTR11007", e.getCause()); |
1082 | 1083 | } |
1083 | 1084 | } catch (Throwable e) { |
1084 | - throw new StrutsProcessInternalException("FSTR11008", e.getCause()); | |
1085 | + throw new StrutsProcessInternalException("FSTR11008", e); | |
1085 | 1086 | } |
1086 | 1087 | } |
1087 | 1088 |
@@ -1198,7 +1199,7 @@ | ||
1198 | 1199 | } |
1199 | 1200 | |
1200 | 1201 | // アクションメソッドアノテーションにトランザクション必要フラグが設定されている場合に処理 |
1201 | - if (actionMethod.transaction()) { | |
1202 | + if (!actionMethod.transaction().transactionClass().equals(TransactionManager.class)) { | |
1202 | 1203 | actionContext.getTransactionContainer().commit(); |
1203 | 1204 | } |
1204 | 1205 | } |
@@ -1230,7 +1231,7 @@ | ||
1230 | 1231 | } |
1231 | 1232 | |
1232 | 1233 | // アクションメソッドアノテーションにトランザクション必要フラグが設定されている場合に処理 |
1233 | - if (actionMethod.transaction()) { | |
1234 | + if (!actionMethod.transaction().transactionClass().equals(TransactionManager.class)) { | |
1234 | 1235 | actionContext.getTransactionContainer().rollback(); |
1235 | 1236 | } |
1236 | 1237 | } |
@@ -1262,7 +1263,7 @@ | ||
1262 | 1263 | } |
1263 | 1264 | |
1264 | 1265 | // アクションメソッドアノテーションにトランザクション必要フラグが設定されている場合に処理 |
1265 | - if (actionMethod.transaction()) { | |
1266 | + if (!actionMethod.transaction().transactionClass().equals(TransactionManager.class)) { | |
1266 | 1267 | actionContext.getTransactionContainer().close(); |
1267 | 1268 | } |
1268 | 1269 | } |
@@ -24,7 +24,7 @@ | ||
24 | 24 | public static final StrutsConfigNames STRUTS_ACTION_CLASS_SUFFIX_FORM = new StrutsConfigNames("strtus.action.class.suffix.form"); |
25 | 25 | |
26 | 26 | /** ディフォルトアクションメソッド */ |
27 | - public static final StrutsConfigNames STRUTS_ACTION_DEFAULT = new StrutsConfigNames("strtus.action.default"); | |
27 | + public static final StrutsConfigNames STRUTS_ACTION_DEFAULT = new StrutsConfigNames("strtus.action.method.default"); | |
28 | 28 | |
29 | 29 | /** ルートアクションパス(アクション未指定時にリダイレクトするパス) */ |
30 | 30 | public static final StrutsConfigNames STRUTS_ACTION_INDEX = new StrutsConfigNames("struts.action.index"); |
@@ -139,7 +139,7 @@ | ||
139 | 139 | public static Map<String, String> getMap() { |
140 | 140 | Map<String, String> map = new HashMap<String, String>(); |
141 | 141 | for (String key : getPropertyKeys()) { |
142 | - map.put(key, getString(ConfigName.get(key))); | |
142 | + map.put(key, getString(key)); | |
143 | 143 | } |
144 | 144 | return map; |
145 | 145 | } |
@@ -146,28 +146,43 @@ | ||
146 | 146 | |
147 | 147 | /** |
148 | 148 | * 指定されたキーのプロパティが未指定であるか判定します。<br> |
149 | + * @param key プロパティキー | |
150 | + * @return 指定されたキーのプロパティが未指定である場合にtrueを返却 | |
151 | + */ | |
152 | + private static boolean isEmpty(String key) { | |
153 | + return StringUtil.isEmpty(getString(key)); | |
154 | + } | |
155 | + | |
156 | + /** | |
157 | + * 指定されたキーのプロパティが未指定であるか判定します。<br> | |
149 | 158 | * @param name プロパティ定義名 |
150 | 159 | * @return 指定されたキーのプロパティが未指定である場合にtrueを返却 |
151 | 160 | */ |
152 | 161 | public static boolean isEmpty(ConfigName name) { |
153 | - return StringUtil.isEmpty(getString(name)); | |
162 | + if (name == null) { | |
163 | + throw new NullPointerException(); | |
164 | + } | |
165 | + return isEmpty(name.key()); | |
154 | 166 | } |
155 | 167 | |
156 | 168 | /** |
157 | 169 | * 指定キーのプロパティを取得します。<br> |
158 | - * @param name プロパティ定義名 | |
170 | + * @param key プロパティキー | |
159 | 171 | * @return プロパティ値 |
160 | 172 | */ |
161 | - public static String getString(ConfigName name) { | |
173 | + private static String getString(String key) { | |
174 | + if (key == null) { | |
175 | + throw new NullPointerException(); | |
176 | + } | |
162 | 177 | if (instance == null) { |
163 | 178 | throw new WebcoreConfigurationException("FCRE00022", new Object[] { Config.class.getName() }); |
164 | 179 | } |
165 | 180 | if (instance.strict) { |
166 | - if (!instance.properties.containsKey(name.key())) { | |
167 | - throw new WebcoreConfigurationException("FCRE00023", new Object[] { name }); | |
181 | + if (!instance.properties.containsKey(key)) { | |
182 | + throw new WebcoreConfigurationException("FCRE00023", new Object[] { key }); | |
168 | 183 | } |
169 | 184 | } |
170 | - String value = instance.properties.getProperty(name.key()); | |
185 | + String value = instance.properties.getProperty(key); | |
171 | 186 | value = Environment.bindEnv(value); |
172 | 187 | return value == null ? "" : value; |
173 | 188 | } |
@@ -174,14 +189,26 @@ | ||
174 | 189 | |
175 | 190 | /** |
176 | 191 | * 指定キーのプロパティを取得します。<br> |
192 | + * @param name プロパティ定義名 | |
193 | + * @return プロパティ値 | |
194 | + */ | |
195 | + public static String getString(ConfigName name) { | |
196 | + if (name == null) { | |
197 | + throw new NullPointerException(); | |
198 | + } | |
199 | + return getString(name.key()); | |
200 | + } | |
201 | + | |
202 | + /** | |
203 | + * 指定キーのプロパティを取得します。<br> | |
177 | 204 | * カンマ区切りされているプロパティを文字列配列として取得します。<br> |
178 | - * @param name プロパティ定義名 | |
205 | + * @param key プロパティキー | |
179 | 206 | * @param execludeComment トークン先頭に"#"がある場合は除外する場合にtrueを返却 |
180 | 207 | * @return プロパティ値 |
181 | 208 | */ |
182 | - public static String[] getStrings(ConfigName name, boolean execludeComment) { | |
183 | - String def = Config.getString(name); | |
184 | - String[] values = StringUtil.isEmpty(def) ? new String[0] : Config.getString(name).split(","); | |
209 | + private static String[] getStrings(String key, boolean execludeComment) { | |
210 | + String def = Config.getString(key); | |
211 | + String[] values = StringUtil.isEmpty(def) ? new String[0] : Config.getString(key).split(","); | |
185 | 212 | if (execludeComment) { |
186 | 213 | LinkedList<String> list = new LinkedList<String>(); |
187 | 214 | for (String value : values) { |
@@ -199,39 +226,102 @@ | ||
199 | 226 | * 指定キーのプロパティを取得します。<br> |
200 | 227 | * カンマ区切りされているプロパティを文字列配列として取得します。<br> |
201 | 228 | * @param name プロパティ定義名 |
229 | + * @param execludeComment トークン先頭に"#"がある場合は除外する場合にtrueを返却 | |
202 | 230 | * @return プロパティ値 |
203 | 231 | */ |
232 | + public static String[] getStrings(ConfigName name, boolean execludeComment) { | |
233 | + if (name == null) { | |
234 | + throw new NullPointerException(); | |
235 | + } | |
236 | + return getStrings(name.key(), execludeComment); | |
237 | + } | |
238 | + | |
239 | + /** | |
240 | + * 指定キーのプロパティを取得します。<br> | |
241 | + * カンマ区切りされているプロパティを文字列配列として取得します。<br> | |
242 | + * @param key プロパティキー | |
243 | + * @return プロパティ値 | |
244 | + */ | |
245 | + private static String[] getStrings(String key) { | |
246 | + return getStrings(key, true); | |
247 | + } | |
248 | + | |
249 | + /** | |
250 | + * 指定キーのプロパティを取得します。<br> | |
251 | + * カンマ区切りされているプロパティを文字列配列として取得します。<br> | |
252 | + * @param name プロパティ定義名 | |
253 | + * @return プロパティ値 | |
254 | + */ | |
204 | 255 | public static String[] getStrings(ConfigName name) { |
205 | - return getStrings(name, true); | |
256 | + if (name == null) { | |
257 | + throw new NullPointerException(); | |
258 | + } | |
259 | + return getStrings(name.key()); | |
206 | 260 | } |
207 | 261 | |
208 | 262 | /** |
209 | 263 | * 指定キーのプロパティを取得します。<br> |
264 | + * @param key プロパティキー | |
265 | + * @return プロパティ値 | |
266 | + */ | |
267 | + private static boolean getBoolean(String key) { | |
268 | + String value = getString(key); | |
269 | + return value == null ? false : Boolean.valueOf(value); | |
270 | + } | |
271 | + | |
272 | + /** | |
273 | + * 指定キーのプロパティを取得します。<br> | |
210 | 274 | * @param name プロパティ定義名 |
211 | 275 | * @return プロパティ値 |
212 | 276 | */ |
213 | 277 | public static boolean getBoolean(ConfigName name) { |
214 | - String value = getString(name); | |
215 | - return value == null ? false : Boolean.valueOf(value); | |
278 | + if (name == null) { | |
279 | + throw new NullPointerException(); | |
280 | + } | |
281 | + return getBoolean(name.key()); | |
216 | 282 | } |
217 | 283 | |
218 | 284 | /** |
219 | 285 | * 指定キーのプロパティを取得します。<br> |
286 | + * @param key プロパティキー | |
287 | + * @return プロパティ値 | |
288 | + */ | |
289 | + private static long getLong(String key) { | |
290 | + String value = getString(key); | |
291 | + return value == null ? 0 : Long.parseLong(value); | |
292 | + } | |
293 | + | |
294 | + /** | |
295 | + * 指定キーのプロパティを取得します。<br> | |
220 | 296 | * @param name プロパティ定義名 |
221 | 297 | * @return プロパティ値 |
222 | 298 | */ |
223 | 299 | public static long getLong(ConfigName name) { |
224 | - String value = getString(name); | |
225 | - return value == null ? 0 : Long.parseLong(value); | |
300 | + if (name == null) { | |
301 | + throw new NullPointerException(); | |
302 | + } | |
303 | + return getLong(name.key()); | |
226 | 304 | } |
227 | 305 | |
228 | 306 | /** |
229 | 307 | * 指定キーのプロパティを取得します。<br> |
308 | + * @param key プロパティキー | |
309 | + * @return プロパティ値 | |
310 | + */ | |
311 | + private static int getInteger(String key) { | |
312 | + String value = getString(key); | |
313 | + return value == null ? 0 : Integer.parseInt(value); | |
314 | + } | |
315 | + | |
316 | + /** | |
317 | + * 指定キーのプロパティを取得します。<br> | |
230 | 318 | * @param name プロパティ定義名 |
231 | 319 | * @return プロパティ値 |
232 | 320 | */ |
233 | 321 | public static int getInteger(ConfigName name) { |
234 | - String value = getString(name); | |
235 | - return value == null ? 0 : Integer.parseInt(value); | |
322 | + if (name == null) { | |
323 | + throw new NullPointerException(); | |
324 | + } | |
325 | + return getInteger(name.key()); | |
236 | 326 | } |
237 | 327 | } |
@@ -8,8 +8,7 @@ | ||
8 | 8 | * トランザクション管理上位抽象クラス<br> |
9 | 9 | * <br> |
10 | 10 | * データベースアクセスを利用する業務ロジックのトランザクション管理上位クラスです。<br> |
11 | - * JDBCデータベースアクセスやO/Rマッパーアクセス等の各種アドオンモジュールでの、 | |
12 | - * トランザクション管理インタフェースを統一するために設けられました。<br> | |
11 | + * JDBCデータベースアクセスやO/Rマッパーアクセス等の各種アドオンモジュールにおけるインタフェースを統一するために設けられました。<br> | |
13 | 12 | * |
14 | 13 | * @author Kitagawa<br> |
15 | 14 | * |
@@ -23,6 +22,9 @@ | ||
23 | 22 | /** ロガーオブジェクト */ |
24 | 23 | protected final CodeConvertLogger log = new CodeConvertLogger(LoggerFactory.getLogger(getClass())); |
25 | 24 | |
25 | + /** 接続定義名前空間 */ | |
26 | + private String namespace; | |
27 | + | |
26 | 28 | /** オープン済みフラグ */ |
27 | 29 | private boolean opened; |
28 | 30 |
@@ -31,14 +33,23 @@ | ||
31 | 33 | |
32 | 34 | /** |
33 | 35 | * コンストラクタ<br> |
36 | + * @param namespace 接続定義名前空間 | |
34 | 37 | */ |
35 | - protected TransactionManager() { | |
38 | + protected TransactionManager(String namespace) { | |
36 | 39 | super(); |
40 | + this.namespace = namespace; | |
37 | 41 | this.opened = false; |
38 | 42 | this.followedContainer = false; |
39 | 43 | } |
40 | 44 | |
41 | 45 | /** |
46 | + * コンストラクタ<br> | |
47 | + */ | |
48 | + protected TransactionManager() { | |
49 | + this(null); | |
50 | + } | |
51 | + | |
52 | + /** | |
42 | 53 | * コンテナ管理下フラグを取得します。<br> |
43 | 54 | * @return コンテナ管理下フラグ |
44 | 55 | */ |
@@ -154,6 +165,14 @@ | ||
154 | 165 | } |
155 | 166 | |
156 | 167 | /** |
168 | + * 接続定義名前空間を取得します。<br> | |
169 | + * @return 接続定義名前空間 | |
170 | + */ | |
171 | + public final String getNamespace() { | |
172 | + return namespace; | |
173 | + } | |
174 | + | |
175 | + /** | |
157 | 176 | * トランザクションがオープンされているか判定します。<br> |
158 | 177 | * @return トランザクションがオープンされている場合にtrueを返却 |
159 | 178 | */ |