Weblogic 6.1 JMS/EJB Design Question

Any thoughts from gurus or those who have skinned their knees on similar
issues would be GREATLY appreciated!
Environment:
Weblogic 6.1 sp3/Oracle 8.1.7 on Solaris
I've got a webservice that invokes the webservice ejb and then delegates
down to business layer ejb that delegates down to data layer dao classes
that store off on average 150 records which include a clob field containing
about 4k of data. (All in one JTA transaction) (I'll refer to this as
operation 1)
There is a logically independent process (parsing the clob data elements)
that I'd like to kick off after all 150 records have been stored. (Needs
access to the committed data) (I'll refer to this as operation 2)
Questions:
1. Can a stateless session ejb running under a single phase JTS transaction
safely post a message to a JMS topic or queue running on the same weblogic
instance?
2. If so, are there any guidelines as to whether the transaction for
operation 1 will complete before the sender receives notification? (the
concern being that operation 2 will be notified but the data it is
interested in will not be visible yet) If no guarantees, would configuring
a JMS message delivery delay help?
3. This operation will get invoked perhaps a thousand times a day, and I'm
fearful of falling into the message redelivery trap from transaction
rollbacks which possibly could occur from operation 2. Above all else, I
care about NOT having the queue get clogged up with resends. Given that
bias, should I use NOTSUPPORTED then have the session bean that the MDB
delegates to start a transaction or would using BMT from the MDB be more
correct?
4. Any other thoughts?
Thanks!

Alan May wrote:
Any thoughts from gurus or those who have skinned their knees on similar
issues would be GREATLY appreciated!
Environment:
Weblogic 6.1 sp3/Oracle 8.1.7 on Solaris
I've got a webservice that invokes the webservice ejb and then delegates
down to business layer ejb that delegates down to data layer dao classes
that store off on average 150 records which include a clob field containing
about 4k of data. (All in one JTA transaction) (I'll refer to this as
operation 1)
There is a logically independent process (parsing the clob data elements)
that I'd like to kick off after all 150 records have been stored. (Needs
access to the committed data) (I'll refer to this as operation 2)
Questions:
1. Can a stateless session ejb running under a single phase JTS transaction
safely post a message to a JMS topic or queue running on the same weblogic
instance?So is the first transaction going to be writing 150 records to the
database and the publishing a JMS message? Yes, this can all be one in
one transaction in WLS, but it will be a XA/2PC transaction. I'm
curious why you specified single-phase?
>
2. If so, are there any guidelines as to whether the transaction for
operation 1 will complete before the sender receives notification? (the
concern being that operation 2 will be notified but the data it is
interested in will not be visible yet) I'm not sure I follow you here. If the message publish is part of the
transaction then no consumer will receive the message before the publish
transaction commits.
If no guarantees, would configuring a JMS message delivery delay help?
3. This operation will get invoked perhaps a thousand times a day, and I'm
fearful of falling into the message redelivery trap from transaction
rollbacks which possibly could occur from operation 2. There's 2 important WLS JMS features I would suggest you look into:
1) Message redelivery delay & limits
2) Error destinations
Take a look at
http://e-docs.bea.com/wls/docs81/jms/implement.html#1255066
Above all else, I
care about NOT having the queue get clogged up with resends. Given that
bias, should I use NOTSUPPORTED then have the session bean that the MDB
delegates to start a transaction or would using BMT from the MDB be more
correct?I think you'd be better off using redelivery limits and delay than
trying to do the JMS acknowledgement and transaction management yourself.
-- Rob
>
4. Any other thoughts?
Thanks!

Similar Messages

  • To EJB or Not to EJB (Design Question)

    Hello,
    New to EJB i am devlepoing a simple test App. Your suggestions will be very valuable.
    Test App..
    - Authenticate process
    - Search for Orders
    Our compnay policy forces that We must validate the sessionID (created internally) on every page call. Expected Client maybe Web srvices/servlet/JSP. Multiple users and heavy traffic expected.
    My Design...
    - Make Stateless Session EJBs for Authentication
    - Make Stateless Session EJBs for Orders search. Number of functions will be exposed for searching.
    Questions
    - Does it make sense to wrap all the SQL select calls in SESSION EJB? or should i call from JSP directly
    - IS SEESION EJB for authentication is the right choice
    - which is the best place for using Entity EJBs
    Regards
    H

    A good app. design would be as follows:
    Use three "Application Layers"
    1. PRESENTATION LAYER: this layer includes
    -JSP (only for view purposes!!!)
    -FrontController (Pattern usally implemented as Servlet for handling authentication/authorisation AND session handling!!!!!!)
    -ServiceDispatcher (Pattern for dispatching ;-))
    -BusinessDelegate (for encapsulation from the BUSINESS LAYER)
    2. BUSINESS LAYER: this layer includes
    -SessionFacade (usally Stateless Session Beans for your needs for example order!!!)
    3. PERSISTENCE LAYER: this layer includes
    -EntityBeans (CMP or BMP you must decide wich is better for your needs....I prefer BMP, it is more coding, but you are not dependent on app. server provider....CMP runs faster!!!!)
    -DataAccessObject (DAO--> here are your sql-statements and db-connections)
    For all Patterns here look at this side for more information
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/
    TIP: Use the Session API for your session handling!!!!!!!!!!!!
    Regards
    howmad23

  • Re: EJB Design Question

    Hi All,
    I am developing an application based on MVC design pattern in which the servlets
    is the main controller . I am planning to use session beans to access the database
    rather than making direct JDBC calls from the servlet.
    The Session bean would use a connection from a pool and return it back when its
    done with it.
    My question is if there are multiple users accessing the servlet then would there
    be different connection objects and each client would start a new thread/
    Also is there any problem with the above design ?
    Thanks...Kevin

    View - JSP Or Servlet
    Controller - Servlet
    Model - Java Bean
    Session Bean - Facade for Workflow
    Entity Bean - Persistence and Business Logic
    Also look at
    www.theserverside.com
    My question is if there are multiple users accessing the servlet then would
    there
    be different connection objects and each client would start a new thread.
    -Servlets are multithreaded (unless you are using the single threaded
    model). For example you might get a call on doGet() while another is being
    processed on the servlet instance. If you make sure that all you resources
    (session beans, connections etc) are created and destroyed within the
    lifecycle of the doGet() you are safe. All shared data (like session data)
    should be made thread safe.
    "Kevin" <[email protected]> wrote in message
    news:3cb59182$[email protected]..
    >
    Hi All,
    I am developing an application based on MVC design pattern in which theservlets
    is the main controller . I am planning to use session beans to access thedatabase
    rather than making direct JDBC calls from the servlet.
    The Session bean would use a connection from a pool and return it backwhen its
    done with it.
    My question is if there are multiple users accessing the servlet thenwould there
    be different connection objects and each client would start a new thread/
    Also is there any problem with the above design ?
    Thanks...Kevin

  • EJB Design Question

    Hi All,
    I have 2 tables in the DB, namely Product and Inventory. And I have create a Product Bean, which is related to the Product Table. Now I am wondering should I create an Inventory Bean to reflect the Inventory Table? or just to add some operation in the Product Bean to insert/delete/update the Inventory Table?
    Which one is a better choice?

    Greetings,
    Hi All,
    I have 2 tables in the DB, namely Product and
    Inventory. And I have create a Product Bean, which is
    related to the Product Table. Now I am wondering
    should I create an Inventory Bean to reflect the
    Inventory Table? or just to add some operation in the
    Product Bean to insert/delete/update the Inventory
    Table?
    Which one is a better choice?Your question is fundamental to understanding the nature and role of Entity Beans. Entity Beans have a direct association with the 'entities' they represent. An 'entity' is one piece/record of enterprise data like A database tuple (in it's simplest form a table row) - though EBs can represent data from any accessible source (such as naming/directory services, message queues, URLs, legacy systems, object databases, other distributed components, etc...). Through their design contract, EBs provide an object-oriented view of the data they represent (you might think of them as being 'proxies' or 'agents' for a particular piece of information) - and this is absolutely important to understand: EBs map to ENTITIES, NOT to data sources (if you want a data source interface use a Session Bean)! With this in mind:
    * An EB should be written for every entity (specific piece of information) that needs OO representation in your application where appropriate (simply accessing a database does not automatically warrant EBs as the design choice - there are many times/situations where a Session Bean, JavaBean, client-direct-access, etc. is more appropriate)
    * While finders ("SELECT" statements) can map to multiple entities ('multi-row finders' - a finder's ONLY purpose is to return keys for located entities), an EBs ejbCreate ("INSERT"), ejbStore ("UPDATE"), ejbLoad (non-finder "SELECT"), and ejbRemove ("DELETE"), methods should all handle one-and-only-one - as identified by it's primary key - entity/record/row/... (and yes, such a record may be represented throughout multiple tables by way of joins, cascading foreign keys, manual mapping [*not* recomended], etc.).
    * Persistence Management model (BMP vs. CMP) relates only to the locality of the data source access code. All EB state-synchronizatoin (the real 'persistence' in 'persistence management'), management is always at the discretion of the container. A BMP bean coder simply provides the access code for the container to do it's job.
    I hope this is helpful.
    Regards,
    Tony "Vee Schade" Cook

  • EJB Design Patterns Book Question

    I have been recently reading the EJB Design Patterns book by Floyd Marinesu.
    In one of the earlier chapters he says that 'entity beans are transactional creatures, each method call on an entity will require a separate transaction ..'.
    Surely this is wrong, if you are using CMT and mark your method transaction attribute as Required then if the calling bean has a transaction the called bean will use that transaction, rather then requiring a separate transaction.
    Someone please explain.

    Quoted out of context, the statement seems to be incorrect in some cases. IMO, the fact stressed is the "synchronization of the remote entity", which might have been loosely associated with a separate transaction.
    Here's the original quote.
    Furthermore, since entity beans are transactional creatures, each method call on an entity will require a separate transaction on the server side, requiring synchronization of the remote entity with its underlying data store and maintenance on behalf of the application server.
    Maybe Marinescu would answer that better :-)

  • SOA real-time design question

    Hi All,
    We are currently working with SOA Suite 11.1.1.4. I have a SOA application requirement to receive real-time feed for six data tables from an external third party. The implementation consists of five one-way operations in the WSDL to populate the six database tables.
    I have a design question. The organization plans to use this data across various departments which requires to replicate or supply the data to other internal databases.
    In my understanding there are two options
    1) Within the SOA application fork the data hitting the web-service to different databases.
    My concern with this approach is what if organizations keep coming with such requests and I keep forking and supplying multiple internal databases with the same data. This feed has to be real-time, too much forking with impact the performance and create unwanted dependencies for this critical link for data supply.2) I could tell other internal projects to get the data from the populated main database.
    My concern here is that firstly the data is pushed into this database flat without any constraints and it is difficult to query to get specific data. This design has been purposely put in place to facilitate real-time performance.Also asking every internal projects to get data from main database will affect its performance.
    Please suggest which approach should I take (advantage/disadvantage. Apart from the above two solutions, is there any other recommended solution to mitigate the risks. This link between our organization and external party is somewhat like a lifeline for BAU, so certainly don't want to create more dependencies and overhead.
    Thanks

    I had tried implementing the JMS publisher/subscriber pattern before, unfortunately I experienced performance was not so good compared to the directly writing to the db adapter. I feel the organization SOA infrastructure is not setup correctly to cope with the number of messages coming through from external third party. Our current setup consists of three WebLogic Servers (Admin, SOA, BAM) all running on only 8GB physical RAM on one machine. Is there Oracle guideline for setting up infrastructure for a SOA application receiving roughly 600000 messages a day. I am using SOA 11.1.1.4. JMS publisher/subscriber pattern just does not cope and I see significant performance lag after few hours of running. The JMS server used was WebLogic JMS
    Thanks
    Edited by: user5108636 on Jun 13, 2011 4:19 PM
    Edited by: user5108636 on Jun 13, 2011 7:03 PM

  • Message lost during Message Send in weblogic 9.2 JMS

    I am using Weblogic Server 9.2 in a clustered environment (2 nodes in separate machines). The application deployed has ejb timers which picks up data from DB, and sends text messages (very small size as its just an ID) to a Queue (using the JMS APIs - QueueSender.send(message)). There is an MDB (with max-beans-in-free-pool) configured to be 20 listenting to this message. There might be 1-20 records picked up from the DB and the id of those records will be sent to the JMS Queue as separate JMS messages. i.e. QueueSender.send will be called as many times as there are record ids to send. The timer after sending the message to the queue sets the status of all the data it picked up to "Busy" in the same transaction as the message send. We are using XA driver and the JMS Connection factory is also XA enabled. We had problems with this XA transaction as weblogic sometimes sends the messages and before db commit happened to set the status to "Busy". We had a workaround to this problem by setting the JMS Connection factory setting "time to Deliver" to 300 so that the messages are visible to the MDB only after 300 ms thereby giving time for db commit to be over as per the suggestion in the following link. http://jayesh-patel.blogspot.com/. We had done this 2 months back and to date we find no problem.
    Now we are facing another strange problem. The JMS sometime misses delivering the messages. This is evident from the logs we had printed from the MDB. The logs indicate some messages has reached the MDB and some did not. This problem occurs occasionally. Also what I see is that this had occured under normal load conditions only though this application operates under high loads (number of messages being processed per day may go up to 5000). In the last one month this had occured 3 times. The JMS messaging is becoming unreliable.
    This seems to be a bug in Weblogic 9.2 JMS. Is there any workaround to prevent this problem. ?

    It is doubtful that JMS is losing messages. Suggestions:
    * Try increasing your sheduled message delay. 300 millis is a short delay -- any small network glitch, disk hardware issue, or even a single JVM GC in the JDBC driver can cause the database to take longer than 300 millis to complete its part of the transaction.
    * Try "WebLogic JMS Message Lifecycle Logging" if you want to trace message activity.
    * Instead of the delay, consider using WebLogic's Datasource "LLR" option, a commonly used solution to your use case. This is an optimization option that yields fully ACID (safe) transactions, and has the very nice side effect of deterministically forcing the TM to always commit the database portion of a transaction before committing any other resources participating in the same transaction.
    Links:
    http://download.oracle.com/docs/cd/E13222_01/wls/docs92/jms_admin/troubleshoot.html
    http://download.oracle.com/docs/cd/E13222_01/wls/docs92/jta/llr.html#LLRfailover
    http://download.oracle.com/docs/cd/E13222_01/wls/docs92/jdbc_admin/jdbc_datasources.html#llr
    Tom
    Edited by: TomB on May 7, 2010 5:20 PM

  • EJB Design Patterns

    I picked up "EJB Design Patterns" by Floyd Marinescu. As I started reading through the book I began to wonder if these were standard patterns. So my question is this. Are the patterns described in this book accepted standards for design EJB's?
    Thanks

    Hi,
    You can check out the Core J2EE patterns at
    http://java.sun.com/blueprints/corej2eepatterns/index.html
    and also some examples and other strategies as applied in an application at
    http://java.sun.com/blueprints/patterns/catalog.html
    The Core patterns would be considered as the standard patterns and would probably help quite a bit.
    hope that helps,
    Sean

  • Architecture/Design Question with best practices ?

    Architecture/Design Question with best practices ?
    Should I have separate webserver, weblogic for application and for IAM ?
    If yes than how this both will communicate, for example should I have webgate at both the server which will communicate each other?
    Any reference which help in deciding how to design and if I have separate weblogic one for application and one for IAM than how session management will occur etc
    How is general design happens in IAM Project ?
    Help Appreciated.

    The standard answer: it depends!
    From a technical point of view, it sounds better to use the same "midleware infrastructure", BUT then the challenge is to find the lastest weblogic version that is certified by both the IAM applications and the enterprise applications. This will pull down the version of weblogic, since the IAM application stack is certified with older version of weblogic.
    From a security point of view (access, availability): do you have the same security policy for the enterprise applications and the IAM applications (component of your security architecture)?
    From a organisation point of view: who is the owner of weblogic, enterprise applications and IAM applications. In one of my customer, application and infrastructure/security are in to different departments. Having a common weblogic domain didn't feet in the organization.
    My short answer would be: keep it separated, this will save you a lot of technical and political challenges.
    Didier.

  • J2EE Design Questions

    Please forgive me, I am just getting into J2EE and, despite having a mountain of manuals on my desk, I'm having a little trouble figuring out how everything fits together...
    Question 1.
    Is there any standard application entry point for an EJB container... kind of like main() in a plain old java application, or the contextInitialized() method for a ServletContextListener in a web container?
    Question 2.
    Is there any kind of an analog to web.xml for EJB containers? If not, is there some kind of standard way to set initialization parameters for EJBs?
    Question 3.
    Is there any kind of JNDI service provider created for me by my EJB container? For example, the (rather old) article here:
    http://java.sun.com/products/jndi/tutorial/getStarted/examples/naming.html
    suggests the following code:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
        "com.sun.jndi.fscontext.RefFSContextFactory");
    Context ctx = new InitialContext(env);specifically 'Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory"' looks like a bunch of voodoo to me, and also mentions something about the file system... I don't want my JNDI to have anything to do with my filesystem. Do I need to install some kind of JNDI server or LDAP server or something? Sorry... I'm really confused.
    Question 4.
    In my test application, I'm trying to centralize logging. I have a stateless EJB that implements logging capability. When instantiated, (in theory) it should register it's logging element to JNDI, so that further instantiations of the logging EJB should all direct their calls to the same element.
    I fully realize that this would imply (at best), in a distributed environment, the rather strange behavior of logging calls bouncing around to the first machine that happend to instantiate a logging bean...
    regardless, I have the following broken code:
    import javax.ejb.Stateless;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    @Stateless
    public class LogEJB implements VCMarkWeb.log.LogEJBRemote {
        private transient Context context;
        private transient Log     log;
        private transient boolean logMaster = false;
        private int logLevel;
        public
        LogEJB() {               
            try {
                context = new InitialContext();
                Log     globLog = (Log) context.lookup("log");           
                if (log != null){
                    this.log = globLog;
                    return;
                log = new LogWindow(800, 600, "LogBean", 5);
                log.out("Logging born.");
                context.bind("log", log);
                this.logMaster = true;           
            catch (Exception exception) {
                System.out.println("LogEJB: Exception while instantiating.");
                System.out.println(exception.getMessage());
        public void
        finalize() {
            if (!logMaster)
                return;
            try {
                context.unbind("log");
            catch (Exception exception) {
                System.out.println("LogEJB.finalize(): Exception unbinding log.");
                System.out.println(exception.getMessage());
    } Obviously, this code is broken, because my EJB has overridden finalize(), which is apparently not allowed. In this case (since I'm going to have to delete that finalize() method), how could I assure that my reference to a logging element will be unbound once the owner of that logging element is garbage-collected?
    ..or.. if I'm asking Question #5 in too convoluted of a way...
    Question 5'. Say, when my EJB container is kicked off, I want to create a single class containing a swing window, which will exist for the lifetime of the container, to which I can pass a handle to, such that any EJB's can invoke its methods? How would I do that, and how would I pass to my EJBs a handle to said class the 'right way'(tm)?
    Thanks so much for your assistance, J2EE design gurus :)

    singletons are counter to the very concept of distributed computing, which EJB is of course liable to do.
    So while you may have a class that behaves like a singleton inside its own enterprise application context, there is no guarantee it will behave like a singleton when seen from the perspective of a client.
    In fact, when the enterprise application is run in a distributed environment it's guaranteed to not be a singleton anymore as each JVM instance will have its own instance of the class loaded.
    It can get even worse depending on application server architecture, and you may end up having several instances of your "singleton" running inside the same server (possibly the same application) though that is more rare.
    So the best thing to do with singletons is forget all about them.

  • EJB Design

    I have a design question - which is better, a stateless session bean or a read only entity bean?

    I stand corrected! You're right Abhishek, they can't be accessed concurrently. One client is mapped to one stateless session bean but that mapping isn't fixed.
    According to Section 7.8 of the EJB 2.0 PFD2:
    "Because all instances of a stateless session bean are equivalent, the container can choose to delegate a client-invoked method to any available instance. This means, for example, that the Container may delegate the requests from the same client within the same transaction to different instances, and that the Container may interleave requests from multiple transactions to the same instance."
    My statement that stateless session beans are never passivated still holds.
    Anyway...
    It would be kind of weird to have some sort of read-only EntityBean. I'd much rather store that "data" as a static final (yes, it's allowed) member of a stateless SessionBean. But then again, that seems weird too (but a little less so).
    Again, it depends on whether that data changes or not and, if it does change, how often and how it is updated.
    You could even put it up in a directory (JNDI) to save on EJBs! (A bit extreme, though.)
    It really depends on the intended use...

  • Where can I get the material about EJB Design?

    I am working with EJB for a short time.I know that a
    well-designed architecture is very important.So I want to learn more about the EJB Design.Can anyone tell me where to find such material?And which book shall I choose?
    Thank you.

    if you are doing some browse-server design using ejb, I think you can read the sun's blueprint of j2ee, and study the sample application - pet store.
    best regards.

  • How can I develop a web application using EJB design pattern?

    I have searched over the web and found quite a lot of tutorials on how to use the EJB design pattern.
    I know that there will be a home interface, EJB object interface and a SessionBean.
    But the tutorials often only cover a single class, this made me unable to get a complete picture of how EJB design pattern can be implemented into a whole system.
    I am now required to devleop an online shopping web application using EJB and JSP page.
    I think I will need to create a lot of classes: Member, ShoppingCart, Product...etc.
    What I want to ask is that, do I need to create a home interface, EJB object interface and a SessionBean for each of these classes?
    I really need some ideas on how to develop this system using EJB + JSP pages.
    Many thanks to you all.

    For every EJB that you want to create, you will need to code a home and remote interface and a bean class.
    You could start getting your ideas here
    http://www.theserverside.com/books/wiley/masteringEJB/
    http://www.coreservlets.com

  • Design question: Scheduling a Variable-timeslot Resource

    I originally posted this in general java programming, because this seemed like a more high-level design descussion. But now I see some class design questions. Please excuse me if this thread does not belong here (this is my first time using the forum, save answering a couple questions).
    Forum,
    I am having trouble determining a data structure and applicable algorithm (actually, even more general than the data structure -- the general design to use) for holding a modifiable (but more heavily read/queried than updated), variable-timeslot schedule for a given resource. Here's the situation:
    Let's, for explanation purposes, say we're scheduling a school. The school has many resources. A resource is anything that can be reserved for a given event: classroom, gym, basketball, teacher, janitor, etc.
    Ok, so maybe the school deal isn't the best example. Let's assume, for the sake of explanation, that classes can be any amount of time in length: 50 minutes, 127 minutes, 4 hours, 3 seconds, etc.
    Now, the school has a base operation schedule, e.g. they're open from 8am to 5pm MTWRF and 10am to 2pm on saturday and sunday. Events in the school can only occur during these times, obviously.
    Then, each resource has its own base operation schedule, e.g. the gym is open from noon to 5pm MTWRF and noon to 2pm on sat. and sun. The default base operation schedule for any resource is the school which "owns" the resource.
    But then there are exceptions to the base operation schedule. The school (and therefore all its resources) are closed on holidays. The gym is closed on the third friday of every month for maintenance, or something like that. There are also exceptions to the available schedule due to reservations. I've implemented reservations as exceptions with a different status code to simplify things a little bit: because the basic idea is that an exception is either an addition to or removal from the scheduleable times of that resource. Each exception (reservation, closed for maintenance, etc) can be an (effectively) unrestricted amount of time.
    Ok, enough set up. Somehow I need to be able to "flatten" all this information into a schedule that I can display to the user, query against, and update.
    The issue is complicated more by recurring events, but I think I have that handled already and can make a recurring event be transparent from the application point of view. I just need to figure out how to represent this.
    This is my current idea, and I don't like it at all:
    A TimeSlot object, holding a beginning date and ending date. A data structure that holds list of TimeSlot objects in order by date. I'd probably also hold an index of some sort that maps some constant span of time to a general area in the data structure where times around there can be found, so I avoid O(n) time searching for a given time to find whether or not it is open.
    I don't like this idea, because it requires me to call getBeginningDate() and getEndDate() for every single time slot I search.
    Anyone have any ideas?

    If I am correct, your requirement is to display a schedule, showing the occupancy of a resource (open/closed/used/free and other kind of information) on a time line.
    I do not say that your design is incorrect. What I state below is strictly my views and should be treated that way.
    I would not go by time-slot, instead, I would go by resource, for instance the gym, the class rooms (identified accordingly), the swimming pool etc. are all resources. Therefore (for the requirements you have specified), I would create a class, lets say "Resource" to represent all the resources. I would recommend two attributes at this stage ("name" & "identifier").
    The primary attribute of interest in this case would be a date (starting at 00:00hrs and ending at 24:00hrs.), a span of 24hrs broken to the smallest unit of a minute (seconds really are not very practical here).
    I would next encapsulate the availability factor, which represents the concept of availability in a class, for instance "AvailabilityStatus". The recommended attributes would be "date" and "status".
    You have mentioned different status, for instance, available, booked, closed, under-maintainance etc. Each of these is a category. Let us say, numbered from 0 to n (where n<128).
    The "date" attribute could be a java.util.Date object, representing a date. The "status", is byte array of 1440 elements (one element for each minute of the day). Each element of the byte array is populated by the number designation of the status (i.e, 0,1,2...n etc.), where the numbers represent the status of the minute.
    The "Resource" class would carry an attribute of "resourceStatus", an ordered vector of "ResourceStatus" objects.
    The object (all the objects) could be populated manually at any time, or the entire process could be automated (that is a separate area).
    The problem of representation is over. You could add any number of resources as well as any number of status categories.
    This is a simple solution, I do not address the issues of querying this information and rendering the actual schedule, which I believe is straight forward enough.
    It is recognized that there are scope for optimizations/design rationalization here, however, this is a simple and effective enough solution.
    regards
    [email protected]

  • LDAP design question for multiple sites

    LDAP design question for multiple sites
    I'm planning to implement the Sun Java System Directory Server 5.2 2005Q1 for replacing the NIS.
    Currently we have 3 sites with different NIS domains.
    Since the NFS over the WAN connection is very unreliable, I would like to implement as follows:
    1. 3 LDAP servers + replica for each sites.
    2. Single username and password for every end user cross those 3 sites.
    3. Different auto_master, auto_home and auto_local maps for three sites. So when user login to different site, the password is the same but the home directory is different (local).
    So the questions are
    1. Should I need to have 3 domains for LDAP?
    2. If yes for question 1, then how can I keep the username password sync for three domains? If no for question 1, then what is the DIT (Directory Infrastructure Tree) or directory structure I should use?
    3. How to make auto map work on LDAP as well as mount local home directory?
    I really appreciate that some LDAP experta can light me up on this project.

    Thanks for your information.
    My current environment has 3 sites with 3 different NIS domainname: SiteA: A.com, SiteB:B.A.com, SiteC:C.A.com (A.com is our company domainname).
    So everytime I add a new user account and I need to create on three NIS domains separately. Also, the password is out of sync if user change the password on one site.
    I would like to migrate NIS to LDAP.
    I want to have single username and password for each user on 3 sites. However, the home directory is on local NFS filer.
    Say for userA, his home directory is /user/userA in passwd file/map. On location X, his home directory will mount FilerX:/vol/user/userA,
    On location Y, userA's home directory will mount FilerY:/vol/user/userA.
    So the mount drive is determined by auto_user map in NIS.
    In other words, there will be 3 different auto_user maps in 3 different LDAP servers.
    So userA login hostX in location X will mount home directory on local FilerX, and login hostY in location Y will mount home directory on local FilerY.
    But the username and password will be the same on three sites.
    That'd my goal.
    Some LDAP expert suggest me the MMR (Multiple-Master-Replication). But I still no quite sure how to do MMR.
    It would be appreciated if some LDAP guru can give me some guideline at start point.
    Best wishes

Maybe you are looking for

  • GetVariable() doesn't work in FireFox for object member variables

    I'm trying to access Flash member variables from Javascript using GetVariable. The following line of code works for IE but not for Firefox: var variable = swf.GetVariable("someObject.someProperty"); In IE, the GetVariable() function returns the corre

  • Why use RMAN CATALOG ?

    Hi, Anybody tell me why use RMAN CATALOG and what benifits if i have create catalog ?

  • ORA-00205 Error

    i have installed Oracle 8.1.5 Server on Windows 2000 Server, the installation goes well, i have created Database ORCL, now when i connect it it gives ORA-12638 Error however i am able to solve it by modifiying the sqlnet.ora SQLNET.AUTHENTICATION_SER

  • SAP BO Reports installation

    Hi All, What are tools i need to install to develop and deploy the SAP BO Reports? Please clarify with and tools with functionality Thanks Sivs

  • Each time i log on firefox works ok for about 5 minutes then becomes unavailable

    i have logged on with an excellent signal many times in the last week but each time i use the computer to look at pages after about 4 to 5 minutes a page comes up saying server not available