-
Notifications
You must be signed in to change notification settings - Fork 0
/
Castle main limitations.txt
91 lines (54 loc) · 3.39 KB
/
Castle main limitations.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
** Most of the issues below will be fixed by Castle.DynamicProxy 2.0
Interface proxy and properties only available on the implementation type
========================================================================
Reported by: hammett (April 12th, 2006)
This is easy to reproduce.
public interface IMyService
{
void DoSomething();
}
[Transactional]
public class MyServiceImplementation : IMyService
{
public int SomeParam
{ get and set implementation here }
[Transaction]
public void DoSomething()
{
}
}
And on the configuration
<component
id="my.service"
service="IMyService, MyAssembly"
type="MyServiceImplementation, MyAssembly">
<parameters>
<SomeParam>100</SomeParam>
</parameters>
</component>
The Transactional/Transaction will force the container to create a proxy for the component. As the component was registered with a service contract (interface) dynamic proxy will generate an interface proxy. The container will try to set the propertu SomeParam on the proxy and boom, you have a nice exception.
Possible solution: New version of DynamicProxy can make all proxies implement an interface ITargetAccessor. The container can check for this interface before trying to set anything on the component and voila!
Transaction management: cannot suspend current transaction
==========================================================
Reported by: hammett (April 12th, 2006)
The transaction management that Castle is able to do is very limited compared to what DTC can offer (through COM+). In order to achieve the same level of features we would need to decide which path to take
- Integrate with DTC
Pros: fine-grained control of integration, support to 2PC, a possible lightweight way of handling transactions without involving COM+
Cons: Few or non-existent documentation. MS really don't want developers 'messing' with their DTC otherwise they would have published its API documentation. It's Windows only.
- Figure out a way of handling suspension or simulate a physical transaction suspension
Pros: simpler solution
Cons: might require lots of hacks
- Integrate with COM+
Pros: standard MS-way of dealing with transaction in an 'enterprise' fashion
Cons: heavyweight, make deployments harder and more subject to 'strange' errors
Windsor component proxies, when accessed through remote, methods are not intercepted
====================================================================================
Reported by: hammett (April 12th, 2006)
Windsor proxy factory choses between two approaches to generate proxies:
- If the type extends MarshalByRef it uses the standard .net infrastructure to construct a proxy
- If the type does not extends MarshalByRef it uses DynamicProxy
However there's an issue with .net proxies, when used in a remote context the calls are not intercepted. A possible solution would be to register a custom sink on the transportation channel being used. There's no easy way of doing this non-intrusively, so it would be up to the user to add a custom sink through the configuration file that configures the remoting infrastructure. The sink, though, need to be coded.
Dynamic proxies cannot be used in a remoting context
====================================================
Reported by: hammett (April 12th, 2006)
Is there a way to transient types cross boundaries?