Wednesday, June 27, 2012

Creating Rooms and Room List in Exchange2010


Few days back when I wanted to create some rooms and room lists in Outlook I was struggling. I tried gathering information from the net and finally managed to find the best solution. So this post is for all the folks who want to create rooms and room List in Exchange 2010.

Almost all of us depend on Microsoft Outlook to manage our official mails efficiently. Outlook has a lot of useful features such as organizing mails, scheduling meeting invites, enabling out of office setting, creating contacts/tasks, and many more. Without Outlook most of us would have been in total mess managing the surplus mails.

While scheduling a meeting, we look out for the availability of the attendees and the rooms. Have any of us wondered how are these rooms managed. Well it is very simple. There are numerous room lists in an organisation and each room list has numerous rooms. The question then arises how to create a room Lists and rooms, how to put a set of rooms under a room list, etc etc. This answer is also pretty simple.

Creating new room list:

  • Launch the "Exchange Management Shell".
  • To create a new room list, type the following in the Exchange management shell:
New-DistributionGroup -Name "Building 1 Conference Rooms” -RoomList
  • The room list named "Building 1 Conference Rooms" is created. 
Creating new rooms:
  • Launch the "Exchange Management Console".
  • Select the mailbox option and click on "New Mailbox" option. 
  • Select the option "Room Mailbox". Click on "Next"
  • Select the option "New user". Click on "Next".
  • Specify the First name(for eg room1) and the relevant details. Click on "Next".
  • After clicking on "Finish", the room is created. 
Putting rooms under a room list:

After creating rooms they are generally put under a roomlist. So to put rooms under a roomList:
  • Open the "Active Directory and Users".
  • Find the particular room list. 
  • Right click on the required room list and select "Properties"
  • Option to add members will be available. The required rooms can be added to the room list.
The rooms and room lists are successfully created. They can be used to schedule meetings. 



Monday, April 16, 2012

Co-existence of ColdFusion9 and ColdFusion10 using Apache web server

With ColdFusion10 Beta already out, many of us will be wondering if there is any way ColdFusion9 and ColdFusion10 can co-exist by using any of the Web Servers available. The answer is yes, it is definitely possible.  The next question which will arise is "how can it be achieved?". Well.. It can be achieved very easily by performing the steps listed below:
  1.  Firstly, Apache needs to be installed. It can be downloaded from the link http://httpd.apache.org/
  2. After Installing Apache, a virtual host setup needs to be done. For creating Virtual Hosts in Apache, refer to my previous blog entry on "Creating Virtual Hosts in Apache" or directly click on the link  http://kmaiya.blogspot.in/2011/10/creating-virtual-hosts-in-apache.html
  3. For the co-existence, we can have 2 virtual hosts set up each running on port 81 and 82. 
  4. Configure ColdFusion9 connector to Apache by launching the wsconfig UI which is located in C:\ColdFusion9\runtime\bin directory. 
  5. After configuring the connector, open the Apache's httpd.conf file which is located in the conf directory. Search for the below text in the file:
     # JRun Settings
     LoadModule jrun_module "C:/ColdFusion9/runtime/lib/wsconfig/1/mod_jrun22.so"
     
     JRunConfig Verbose false
     JRunConfig Apialloc false
     JRunConfig Ignoresuffixmap false
     JRunConfig Serverstore "C:/ColdFusion9/runtime/lib/wsconfig/1/jrunserver.store"
     JRunConfig Bootstrap 127.0.0.1:51011
     #JRunConfig Errorurl url 
     #JRunConfig ProxyRetryInterval 600 
     #JRunConfig ConnectTimeout 15 
     #JRunConfig RecvTimeout 300 
     #JRunConfig SendTimeout 15 
     AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
        
    5.  Cut and paste the above section of code inside one of the virtual host block(host running on port 81) defined in httpd.conf. The final Virtual host block :
<VirtualHost *:81>
DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs1"
ServerAdmin www.example1.com
 # JRun Settings
LoadModule jrun_module "C:/ColdFusion9/runtime/lib/wsconfig/1/mod_jrun22.so"
<IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore "C:/ColdFusion9/runtime/lib/wsconfig/1/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51011
    #JRunConfig Errorurl url <optionally redirect to this URL on errors>
    #JRunConfig ProxyRetryInterval 600 <number of seconds to wait before trying to reconnect to unreachable clustered server>
    #JRunConfig ConnectTimeout 15 <number of seconds to wait on a socket connect to a jrun server>
    #JRunConfig RecvTimeout 300 <number of seconds to wait on a socket receive to a jrun server>
    #JRunConfig SendTimeout 15 <number of seconds to wait on a socket send to a jrun server>
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>
</VirtualHost>

       6.  Restart Apache.
       7. Configure ColdFusion10 connector to Apache by launching the wsconfig UI which is located in  C:\ColdFusion10\cfusion\runtime\bin directory. Open the httpd.conf file located in the conf directory of Apache and go to the end of the file. Copy the following line "JkMountFile "C:\ColdFusion10\config\wsconfig\2\uriworkermap.properties"" and paste it in the Virtual host block(virtual host running on port 82).
       8. Open mod_jk.conf file present in the conf directory of Apache and cut the below lines:

JkMountFile "C:\ColdFusion10\config\wsconfig\2\uriworkermap.properties"
    # Select the timestamp log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf
    Alias /CFIDE "C:\ColdFusion10\cfusion\wwwroot\CFIDE"
    <Directory "C:\ColdFusion10\cfusion\wwwroot\CFIDE">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>

       9. Paste it inside the other virtual host block(virtual host running on port 82) defined in httpd.conf file. The final Virtual host block:

   <VirtualHost *:82>
   DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs2"
   ServerAdmin www.example2.com

   # Other directives here

   JkMountFile "C:\ColdFusion10\config\wsconfig\2\uriworkermap.properties"
   # Select the timestamp log format
   JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
   AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf
   Alias /CFIDE "C:\ColdFusion10\cfusion\wwwroot\CFIDE"
   <Directory "C:\ColdFusion10\cfusion\wwwroot\CFIDE">
   Options Indexes FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
   </Directory>

  </VirtualHost>

       10. Restart Apache.
       11. Launch the ColdFusion9 administrator using:
              http://<server_name>:81/CFIDE/administartor/index.cfm
             Launch the ColdFusion10 administartor using:
              http://<server_name>:82/CFIDE/administartor/index.cfm
             where, <server_name> : localhost/IP address/uniquely defined server name.

Thus, by performing the above mentioned steps, CF9 and CF10 can co-exist together. This is very helpful as it saves the time required for multiple configuring/un-configuring ColdFusion connector to Apache. Any application which needs to be run on ColdFusion9 and ColdFusion10 simultaneously can be done easily.
           

Sunday, February 19, 2012

Caching in ColdFusion - Application-level caching


In ColdFusion 9, caching was done at the server level. All the cache properties like timeToLive, timeToIdle, were defined at the server-level in ehcache.xml present in C:\ColdFusion9\lib\ directory.
   
Wouldn’t it be useful to have caching at the application level? Each application will have different settings and configuration. It will be very useful if objects or templates of a particular application is maintained in the application-level cache rather than server-level cache.  The objects can be cached for a definite period of time as required by the application. Maintaining these objects are also easier. This can also improve the performance and reliability of the application server greatly.

Therefore, in ColdFusion 10 we have provided support for application-level caching. This feature will allow developers to have application specific caching configuration by having ehcache.xml settings specified at application level.  Developers will be able to specify path to ehcache.xml in Application.cfc. All the cache functions like cacheGet, cachePut etc. will use this Application specific cache configuration. Functions like cacheGetAllIds() will return all cache Ids for an application if Application configuration is applicable, else it will return all Ids defined at server level.

Using this application specific caching is extremely simple in ColdFusion. With a single line of code in Application.cfc which contains the path to the application specific ehcache.xml, application level caching can be achieved. Simple right? Newbies to Caching in ColdFusion can also get up to speed using application level caching. To make the concept of application specific caching more clear, I will illustrate a small example which puts a struct object into Application specific cache. The “timeToLive” is 5 seconds which is defined in ehcache.xml. So after 5 seconds the object will be removed from the cache. The directory structure of this example is:

Appsecific_cache
  •                 Application.cfc
  •                 Appspecific.cfm
  •                 Ehcache.xml
Where Appspecific_cache is the folder which contains the respective cfm and cfc.

Application.cfc:
<cfcomponent>
 <cfscript>
  this.name = "appSpecificCacheTest";
                //Specifying the path to ehcache.xml
  this.cache.configfile = "ehcache.xml";
        </cfscript>
</cfcomponent>
ehcache.xml
<?xml version="1.0" encoding="UTF-8"?>

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="ehcache.xsd">
    
    <diskStore path="java.io.tmpdir"/>
    
    <cacheManagerEventListenerFactory class="" properties=""/>
    <defaultCache
     maxElementsInMemory="5"
     eternal="false"
     timeToIdleSeconds="30"
     timeToLiveSeconds="5"
     overflowToDisk="true"
     diskSpoolBufferSizeMB="30"
     maxElementsOnDisk="10"
     diskPersistent="false"
     diskExpiryThreadIntervalSeconds="3600"
     memoryStoreEvictionPolicy="LRU"
     clearOnFlush="true"
    />
    
    
    <cache name="app1cache"
     maxElementsInMemory="5"
     eternal="false"
     timeToIdleSeconds="60"
     timeToLiveSeconds="5"
     overflowToDisk="false"
     diskSpoolBufferSizeMB="30"
     maxElementsOnDisk="10"
     diskPersistent="false"
     diskExpiryThreadIntervalSeconds="3600"
     memoryStoreEvictionPolicy="LRU"
     clearOnFlush="true"/>
    
</ehcache>

Appspecific.cfm:

<!--- remove object from Application Specific cache --->
        <cfif ArrayLen(cacheGetAllIds()) gt 0>
 <cfset cacheRemove(ArrayToList(cacheGetAllIds()))>
 </cfif>
  
 <!--- Creating new struct object --->
        <cfset obj1 = structNew()>
        <cfset obj1.name = "xyz">

        <cfoutput>Starting to write to cache..</cfoutput>
        <cfset cachePut("obj1",obj1)>
        <br/>
        <cfoutput>Done!!</cfoutput>
        
        <cfoutput>Trying to fetch cached item...</cfoutput>
        <cfset obj = cacheGet("obj1")>
 <br/>
 <cfdump var="#obj#">
   
  <!--- Giving a sleep of 15 seconds which is greater than timeToLive --->
 <cfscript>
           sleep(15000);          
        </cfscript>
        
        <cfoutput>Trying to fetch cached item after 15 seconds... <br/></cfoutput>
        <cfset obj = cacheGet("obj1")>
 <cfdump var="#obj#">


After executing Appspecific.cfm, we can see that initially the object is present in the cache. After 5 seconds the object is removed from cache because timeToLive is 5 seconds.
This is just a very simple example to demonstrate application specific caching.  The user can change the settings of the cache by modifying the ehcache.xml according to their convenience. Many more such operations can be performed. 
More to caching in my next post..Till then enjoy Application-level caching. :)









Wednesday, February 8, 2012

Solving Space issues in Solaris

Most of us have encountered couple of space issues with Solaris. But sometimes it so happens that there will be space available in the machine but still one cannot install the required software. The below message is shown:

"There is not enough space to install the software. It requires 1,000,223 bytes of space but your machine has just 308,777 bytes free.Please free 691,446 bytes of memory ".

After seeing this message, the most obvious thing which all of us would do is find how much space is available by  using df -eh command. Surprisingly there will be a lot of space on the machine but still the same message is thrown. Thoughts and questions arise as to why?what?how? The amateurs will find it extremely difficult to proceed further.

In the above situation the solution is very simple. This simply happens because the "tmp" directory under root  has very less space. This "tmp" directory stores temporary files during installation by default. So one should manually set the temporary directory to any directory which has space. This is done by the following command:

#export IATEMPDIR=<directory which has space>

For example, If the "tmp" directory under /opt has sufficient space, then the command should be:

#export IATEMPDIR=/opt/tmp/

This can also be:
#IATEMPDIR=/opt/tmp/
#export IATEMPDIR


By doing the above, the temporary directory where the install files are kept is changed to a new directory which has sufficient space. The software will install properly with no issues now.
Hope this post will be helpful for folks who are stuck up with this issue.