Advanced AdministrationSecuring Access to DestinationsTo apply a rolebased Access Control List to a Destination?s configuration, you must configure two attributes on the destination:
Listing 5.1 Sample Destination Security Configuration
Listing 5.1 sets up two roles. The first is a guest role that is allowed to only write to the destination. The second role is only allowed to read from the destination and create a durable subscription. The attributes that can be set on the role element are:
Choosing An Invocation LayerThe Invocation Layer (IL) is the component that is responsible for defining the communications protocol that allows clients to send messages to a destination, and similarly, for the destination to send messages to the clients. JBossMQ can support running different types of Invocation Layers concurrently. All Invocation Layers have a dual channel nature that allows clients to send messages as it concurrently receives messages from the server. Each different type of Invocation Layer will bind a JMS ConnectionFactory (configured to use the IL) to a different location in the JNDI tree. Clients can pick the protocol they wish to use by looking up the correct JNDI location. JBossMQ currently supports four different ILs. This section will further examine these ILs. RMI ILThe first Invocation Layer that was developed was based on Java?s Remote Method Invocation (RMI). This is a very robust IL since it is based on standard RMI technology. The RMI IL should be used when your client application has multiple threads sharing one connection. Network Configuration This IL will try to establish a TCP/IP socket from the server to the client. Therefore, clients that sit behind firewalls or have security restrictions prohibiting the use of SeverSockets should not use this IL. OIL ILThe next Invocation Layer that was developed was the ?Optimized? IL (OIL). The OIL uses a custom TCP/IP protocol and serialization protocol that has very low overhead. This is the recommended protocol to be used since it has the best general-purpose performance characteristics. Network Configuration This IL will try to establish a TCP/IP socket from the server to the client. Therefore, clients that sit behind firewalls or have security restrictions prohibiting the use of SeverSockets should not use this IL. UIL ILThe Unified Invocation Layer (UIL) was developed to allow Applet clients to connect to the server. It is almost identical to the OIL protocol except that a multiplexing layer is used to provide the dual channel characteristics of the IL. The multiplexing layer creates two virtual sockets over one physical socket. This IL is slower than the OIL due to the higher overhead incurred by the multiplexing layer. JVM ILThe Java Virtual Machine (JVM) Invocation Layer was developed to cut out the TCP/IP overhead when the JMS client is running in the same JVM as the server. This IL uses direct method calls for the server to service the client requests. This increases efficiency since no sockets are created and there is no need for the associated worker threads. This is the IL that should be used by Message Driven Beans (MDB) or any other component that runs in the same virtual machine as the server such as servlets or MBeans. Choosing A Message Data Store.The Persistence Manager (PM) is used by a destination to store messages marked as being persistent. JBossMQ has several different implementations of the Persistent Manager, but only one can be enabled per server instance. You should enable the Persistence Manager that best matches your requirements. This section will give you a brief description of the three types of PMs. File PMThe File PM is one of the most robust Persistence Manager that comes with JBossMQ. It creates separate directories for each of the destination created on the server. It then stores each persistent message as a separate file in the appropriate directory. It does not have the best performance characteristics since it is frequently opening and closing files. Rolling Logged PMThe Rolling Logged PM is also a file based Persistence Manager but it has better performance than the File PM because it stores multiple messages in one file reducing the file opening and closing overhead. This is a very fast PM but it is less transactionaly reliable than the File PM due to its reliance on the FileOutputStream.flush() method call. On some operating systems/JVMs the FileOutputStream.flush() method does not guarantee that the data has been written to disk by the time the call returns. JDBC2 PMThe JDBC2 PM is the second version of the original JDBC PM in JBossMQ 2.4.x. It has been substantially simplified and improved. This PM allows you to store persistent messages to relational database using JDBC. The performance of this PM is directly related to the performance that can be obtained from the database. This PM has a very low memory overhead compared to the other Persistence Managers. Furthermore it is also highly integrated with the Message Cache to provide efficient persistence on a system that has a very active Message Cache. Checking how many messages are on a QueueSometimes it's good to know know how many messages have been delivered to a queue. You can check the current depth of the queue by using JMX. The org.jboss.mq.server.jmx.Queue MBeans provides a QueueDepth attribute which reflects the current number of messages sitting on the given queue. Tuning the Message CacheThe Message Cache exposes several attributes for you to monitor the performance of the Message Cache. The attributes that can be viewed via JMX are:
|
|
|||||
© 2003 Core Developers Network Ltd "Core Developers Network", the stylized apple logo and "Core Associates" are trademarks of Core Developers Network Ltd. All other trademarks are held by their respective owners. Core Developers Network Ltd is not affiliated with any of the respective trademark owners. |