[seasar-dotnet:2193] Re: S2Container/S2Dao 1.4.0 RC3 リリース

kotani.k [E-MAIL ADDRESS DELETED]
2012年 8月 24日 (金) 15:25:57 JST


齋藤さん

小谷と申します。

お知らせいただき、ありがとうございます。

.NET4.0と.NET3.5以前では主にAOPの生成(外部のOSSを利用しています)などに挙動の違いがあり、
下記課題などの対応の都合上、S2Container.NETはバージョン1.4.0からは
.NET4.0上での動作を前提として作成しています。
https://www.seasar.org/issues/browse/CONTAINERNET-138

そのため、.NET2.0上でご利用になる場合はバージョン1.3.18をご利用いただけたらと思います。
(1.4.0からの対応は基本的に.NET4.0上での問題に対応するものであり、
1.3.18と1.4.0-RC3で機能的な違いはありません)

また、Visual Studio 2010+.NET4.0上にて齋藤さんよりご提示いただいたソースの変更を行い、
Seasar.Quill.Examplesを実行して正常に動作する
(「社員検索」ボタンを押下すると社員名に"ALLEN"が表示される)ことは確認しました。

ドキュメントには1.4.0〜=.NET4.0での動作が前提、という点について明記致します。

以上です。

2012年8月19日 23:45 Daisuke SAITOH <dsaitoh @ grn.janis.or.jp>:
> 齋藤と申します。
> Seasar.NET 1.4.0 RC3 リリースを試用中させていただいてます。
>
> 本リリースの.NET2.0版にて、インターフェースを使用した際の、再帰的DIが正
> 常に処理されません。
> RC3の一部をRC2の状態に戻したら動作しました。(再現手順の8)
>
> 以下、ちょっと長いですが再現手順です。
> お手数ですがご確認いただければ幸いです。
>
> ====
> ■1. Visual Studio 2008 Express で .NET2.0 版をビルド。
>  (ちなみに、VS2010で2008用ソリューションを取り込んだ場合も同結果)
>
> ■2. プロジェクト「Seasar.Quill.Examples-2008」を実行するため、app.config
> を修正。
>  a) <configSections> に
>   <section name="quill" type="Seasar.Quill.Xml.QuillSectionHandler,
> Seasar.Quill"/>
>   を追加。
>  b) ファイル Seasar.Quill.dll.config にある <quill> セクションをコ
> ピー&ペーストで追加。
>
> ■3. 同プロジェクトを実行し「社員検索」ボタンクリックで "ALLEN" が表示さ
> れる。
>  正常動作を確認。
>
> ■4. 同プロジェクトをインターフェース利用に修正する。
>  まずロジッククラス EmployeeLogic.cs を修正。
>  a) 行25 の 「[Implementation]」を削除。
>  b) 行26 を 「public class EmployeeLogic : IEmployeeLogic」に変更。
>  (インターフェース IEmployeeLogic を追加)
>
> ■5. ロジックインターフェースとして IEmployeeLogic.cs を追加。
> --
> using Seasar.Quill.Attrs;
> using Seasar.Quill.Examples.Entity;
> namespace Seasar.Quill.Examples.Logic
> {
> [Implementation(typeof(EmployeeLogic))]
> public interface IEmployeeLogic
> {
> Employee GetEmployeeByEmpNo(int empNo);
> }
> }
> --
>
> ■6. Form1.cs のロジック用変数を、クラスからインターフェースに変更。
>  a) 行28を「protected IEmployeeLogic employeeLogic;」に変更。
>  (型を IEmployeeLogic に)
>
> ■7. 同プロジェクトを実行し「社員検索」ボタンクリック。すると例外発生が発生。
> --
> System.NullReferenceException はハンドルされませんでした。
> Message="オブジェクト参照がオブジェクト インスタンスに設定されていません。"
> Source="Seasar.Quill.Examples"
> StackTrace:
> 場所 Seasar.Quill.Examples.Logic.EmployeeLogic.GetEmployeeByEmpNo(Int32
> empNo) 場所 C:\Documents and Settings\xxxx\My Documents\Visual Studio
> 2008\Projects\s2container.net-1.4.0-RC3\source\Seasar.Quill.Examples
> \Logic\EmployeeLogic.cs:行 33
> --
>  ※エラー箇所 行33は
> 「Employee emp = employeeDao.GetByEmpNo(empNo);」
>  です。employeeDao が null になっている。(再帰的にDIされない)
>
> ■8. RC3で修正された QuillInjector.cs の 行349 を RC2 に戻してみる。
>  「Inject(component.GetComponentObject(implType));」
>  (引数の field.FieldType を implType に)
>
> ■9. 全体をビルドして「Seasar.Quill.Examples-2008」を実行。
>  「社員検索」ボタンをクリック。"ALLEN"が表示される。
>  (再帰的にDIされる)
>
> ====
> 以上、よろしくお願い致します。
>
> --
> Daisuke SAITOH (齋藤大輔)
> dsaitoh @ grn.janis.or.jp
>
>
> (2012/08/13 21:49), kotani.k wrote:
>> 小谷(koyak)です。
>>
>> S2Container/S2Dao 1.4.0 RC3をリリースしました。
>>
>> 変更点は下記ページをご覧下さい。
>> http://www.seasar.org/wiki/index.php?cmd=edit&page=SeasarWhatsNew%2F2012-08-13
>>
>> 主に不具合修正の反映になります。
>>
>> DBFlute.NET 0.8.9.45の下記exampleプロジェクトでも
>> 動作確認をしています。
>>
>> ・dfnet-asp.net-example
>> ・dfnet-basic-example
>> ・dfnet-multipledb-quill-example
>>
>> 現在のところ.NET4.0対応は2種類のDIコンテナのうちQuillのみ行っています。
>> S2Containerをお使いになる場合はver.1.3.Xのご利用を推奨致します。
>> _______________________________________________
>> seasar-dotnet mailing list
>> seasar-dotnet @ ml.seasar.org
>> https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>>
>
>
> _______________________________________________
> seasar-dotnet mailing list
> seasar-dotnet @ ml.seasar.org
> https://ml.seasar.org/mailman/listinfo/seasar-dotnet


seasar-dotnet メーリングリストの案内