Nice article about the role of an Enterprise Technical Architect.
Link
Wednesday, August 25, 2010
Friday, April 30, 2010
Thursday, April 8, 2010
Wednesday, March 31, 2010
{"Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its depende
Problem:
{"Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}
Discovery:
Noticed that it wasn't installed in the GAC (AKA - C:\WINDOWS\assembly)
Only had System.EnterpriseServices 1.0.5.00 installed. GASP!
FIX: (Wahoo!)
First Attempt: I just tried to copy it over into the assembly with explorer, it failed.
{"Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}
Discovery:
Noticed that it wasn't installed in the GAC (AKA - C:\WINDOWS\assembly)
Only had System.EnterpriseServices 1.0.5.00 installed. GASP!
FIX: (Wahoo!)
First Attempt: I just tried to copy it over into the assembly with explorer, it failed.
From the Console run this: (Path may vary depending on your system.)
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil" /i C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil" /i C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache
No Thanks Required
Just send Money! HAHAHA, Just kidding let me know if it helped you by commenting.
Monday, March 29, 2010
WCF Throttling
http://www.danrigsby.com/blog/index.php/2008/02/20/how-to-throttle-a-wcf-service-help-prevent-dos-attacks-and-maintain-wcf-scalability/
http://kennyw.com/indigo/178
http://kennyw.com/indigo/178
Monday, May 18, 2009
Wednesday, March 25, 2009
Random Notes on JBOSS Cache
JBOSS Cache Notes:
http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp04/html/Tree_Cache_Guide/index.html
http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp04/pdf/Cache_Frequently_Asked_Questions/JBoss_Cache_Frequently_Asked_Questions_CP04.pdf
TreeCache Example:
TreeCache tree = new TreeCache();
tree.setClusterName("demo-cluster");
tree.setClusterProperties("default.xml"); // uses defaults if not provided
tree.setCacheMode(TreeCache.REPL_SYNC);
tree.createService(); // not necessary, but is same as MBean lifecycle
tree.startService(); // kick start tree cache
tree.put("/a/b/c", "name", "Ben");
tree.put("/a/b/c/d", "uid", new Integer(322649));
Integer tmp = (Integer) tree.get("/a/b/c/d", "uid");
tree.remove("/a/b");
tree.stopService();
tree.destroyService(); // not necessary, but is same as MBean lifecycle
TreeCache requires that all keys and node be Serializable. Where this is not a requirement with a PojoCache.
PojoCache extends the functionality of the TreeCache.
JBOSS Cache Websites:
- http://www.jboss.org/jbosscache/
- http://www.jboss.org/wiki/Wiki.jsp?page=CVSRepository
JBoss Cache Version Check:
- java -jar jboss-cache.jar org.jboss.cache.Version
JBoos cache uses JGroups under the covers.
JBossCache has five different cache modes,
- LOCAL - single instance, it will not attempt to replicate anything.
- REPL_SYNC - replicate synchronous between the different cache instances.
- REPL_AYSNC - asynchronous replication betweencache instances.
In the event of a network crash REPL_SYNC will return an error, where REPL_ASYNC will continue to work (However the cache will be out of sync.)
Asynchronous replication is faster (no caller blocking)
ClusterConfig is the attribute where the cluster name is defined. Once a server joins the cluster every change is replicated.
Buddy Replication allows each node to pick one or more 'buddies' in the cluster and only replicate to its buddies. (As of, JBoss Cache 1.4.0)
JBoss Cache is Thread safe.
JBoss Cache allows for presistance and passivation/overflow to a data store.
- Cache Passivation is the process of removing an object from in-memory cache and writing it to a secondary data store (e.g., file system, database) on eviction.
IsolationLevel controls the cache locking.
- NONE
- READ_UNCOMMITTED
- READ_COMMITTED
- REPEATABLE_READ
- SERIALIZABLE
JBoss TreeCache allows for event notification pre and post.
POJOCache uses twice as much memory. Not a good option if running a local cache or not persisting.
Concurrent Access:
JBoss Cache uses a pessimistic locking scheme by default to prevent concurrent access to the same data. Optimistic locking may alternatively be used.
example of how to use JBoss Cache in a standalone (i.e. outside an application server) fashion with dummy transactions:
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
User Transaction tx=(UserTransaction)new InitialContext(prop).lookup("UserTransaction");
TreeCache tree = new TreeCache();
PropertyConfigurator config = new PropertyConfigurator();
config.configure(tree, "META-INF/replSync-service.xml");
tree.createService(); // not necessary
tree.startService(); // kick start tree cache
try {
tx.begin();
tree.put("/classes/cs-101", "description", "the basics");
tree.put("/classes/cs-101", "teacher", "Ben");
tx.commit();
}
catch(Throwable ex) {
try { tx.rollback(); } catch(Throwable t) {}
}
Eviction Policies:
- TreeCache
- org.jboss.cache.eviction.LFUPolicy - Least Frequently Used removed
- org.jboss.cache.eviction.FIFOPolicy - First in First out removed
- org.jboss.cache.eviction.MRUPolicy - Most recently used removed (Why would anyone use this?)
- POJOCache
- org.jboss.cache.aop.eviction.AopLRUPolicy
- ...
Eviction policies can be global or per region.
OOM (OutOfMemoryException) this can be adjusted by modifying the EvictionPolicyConfig attributes.
- wakeUpIntervalInSeconds
- timeToLiveInSeconds
- maxNodes
- region
CacheLoaders are available to store and retrieve data.
- Used to preload a cache.
- Custom CacheLoaders are created by implementing the org.jboss.cache.loader.CacheLoader class.
- There are a few predefined classloaders
JBoss Cache is managed and monitored through the jconsole.
http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp04/html/Tree_Cache_Guide/index.html
http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp04/pdf/Cache_Frequently_Asked_Questions/JBoss_Cache_Frequently_Asked_Questions_CP04.pdf
TreeCache Example:
TreeCache tree = new TreeCache();
tree.setClusterName("demo-cluster");
tree.setClusterProperties("default.xml"); // uses defaults if not provided
tree.setCacheMode(TreeCache.REPL_SYNC);
tree.createService(); // not necessary, but is same as MBean lifecycle
tree.startService(); // kick start tree cache
tree.put("/a/b/c", "name", "Ben");
tree.put("/a/b/c/d", "uid", new Integer(322649));
Integer tmp = (Integer) tree.get("/a/b/c/d", "uid");
tree.remove("/a/b");
tree.stopService();
tree.destroyService(); // not necessary, but is same as MBean lifecycle
TreeCache requires that all keys and node be Serializable. Where this is not a requirement with a PojoCache.
PojoCache extends the functionality of the TreeCache.
JBOSS Cache Websites:
- http://www.jboss.org/jbosscache/
- http://www.jboss.org/wiki/Wiki.jsp?page=CVSRepository
JBoss Cache Version Check:
- java -jar jboss-cache.jar org.jboss.cache.Version
JBoos cache uses JGroups under the covers.
JBossCache has five different cache modes,
- LOCAL - single instance, it will not attempt to replicate anything.
- REPL_SYNC - replicate synchronous between the different cache instances.
- REPL_AYSNC - asynchronous replication betweencache instances.
In the event of a network crash REPL_SYNC will return an error, where REPL_ASYNC will continue to work (However the cache will be out of sync.)
Asynchronous replication is faster (no caller blocking)
ClusterConfig is the attribute where the cluster name is defined. Once a server joins the cluster every change is replicated.
Buddy Replication allows each node to pick one or more 'buddies' in the cluster and only replicate to its buddies. (As of, JBoss Cache 1.4.0)
JBoss Cache is Thread safe.
JBoss Cache allows for presistance and passivation/overflow to a data store.
- Cache Passivation is the process of removing an object from in-memory cache and writing it to a secondary data store (e.g., file system, database) on eviction.
IsolationLevel controls the cache locking.
- NONE
- READ_UNCOMMITTED
- READ_COMMITTED
- REPEATABLE_READ
- SERIALIZABLE
JBoss TreeCache allows for event notification pre and post.
POJOCache uses twice as much memory. Not a good option if running a local cache or not persisting.
Concurrent Access:
JBoss Cache uses a pessimistic locking scheme by default to prevent concurrent access to the same data. Optimistic locking may alternatively be used.
example of how to use JBoss Cache in a standalone (i.e. outside an application server) fashion with dummy transactions:
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
User Transaction tx=(UserTransaction)new InitialContext(prop).lookup("UserTransaction");
TreeCache tree = new TreeCache();
PropertyConfigurator config = new PropertyConfigurator();
config.configure(tree, "META-INF/replSync-service.xml");
tree.createService(); // not necessary
tree.startService(); // kick start tree cache
try {
tx.begin();
tree.put("/classes/cs-101", "description", "the basics");
tree.put("/classes/cs-101", "teacher", "Ben");
tx.commit();
}
catch(Throwable ex) {
try { tx.rollback(); } catch(Throwable t) {}
}
Eviction Policies:
- TreeCache
- org.jboss.cache.eviction.LFUPolicy - Least Frequently Used removed
- org.jboss.cache.eviction.FIFOPolicy - First in First out removed
- org.jboss.cache.eviction.MRUPolicy - Most recently used removed (Why would anyone use this?)
- POJOCache
- org.jboss.cache.aop.eviction.AopLRUPolicy
- ...
Eviction policies can be global or per region.
OOM (OutOfMemoryException) this can be adjusted by modifying the EvictionPolicyConfig attributes.
- wakeUpIntervalInSeconds
- timeToLiveInSeconds
- maxNodes
- region
CacheLoaders are available to store and retrieve data.
- Used to preload a cache.
- Custom CacheLoaders are created by implementing the org.jboss.cache.loader.CacheLoader class.
- There are a few predefined classloaders
JBoss Cache is managed and monitored through the jconsole.
Subscribe to:
Posts (Atom)