One to Many Chat Client!

Hi,
I had been trying to implement One to Many Chat functionality in one of my Flex Apps. After banging my head at so many places I finally came to know about Adobe LCCS and It seems to be doing the trick very well. However, I am facing some roadblocks in implementing this on my server. Would be really great if any of the experts out here can guide me in the appropriate direction.
Actually I am trying to make a platform where our agents will be answering to the queries of our end users in a real time. So in that case, I am planning to create a separate room for each of the agents. (We don't really need to create rooms dynamically as the number of agents is limited). Now after the end users have selected their preferred agent, I want them to be able to chat with that particular agent only. However, one agent should be able to talk to multiple end users at the same time.
I tried to use the simple chat component and that is working very smoothly. However I am facing problems with the default drop down menu that comes with it. I want the following to conditions to be satisfied...
1. If an agent logs in, he should be able to see all the users in the drop down menu, select the user and respond to his query with a private message. The current Simple Chat application does exactly the same. And we are fine till this point.
2. If an end user logs in, he should be able to see only the agent in that drop down menu and in fact the drop down menu should be disabled for him.
Tried to explore the things in the documentation and tutorials but I could not really figure out a way to do this. Is there a way to do it without really playing around with the source code.
Thanks a lot in advance.
Luck.

Ok
First of all can either of you reach the tset accounts ?
http://www.ralphjohnsuk.dsl.pipex.com/ContactTesters.html
At the PC end have they
1) Tuned the app
this is now accessed from the MY AIM menu but when you get to the properties the instructions are then the same.
2) Open the XP firewall to the AIM application. This allows ports 1024 to 5000 in the XP Service PAck 2 firewall to be open.
3) Set the same in her modem and other firewall ?
6:52 PM Wednesday; April 12, 2006

Similar Messages

  • One to many chat in java

    is there any way to provide One to many chatting on LAN. i am trying to do that but i am not able to construct the basic architecture that how actually it should work.
    if anybody who is having any idea that what should be the basic architecture of One to many chatting on LAN then please reply.
    thank you

    shadtab wrote:
    is there any way to provide One to many chatting on LAN. i am trying to do that but i am not able to construct the basic architecture that how actually it should work.
    if anybody who is having any idea that what should be the basic architecture of One to many chatting on LAN then please reply.
    thank youI've made a simple one to many chatting using JMS topic subscriber/publisher

  • How can I make more than one account with chat on clubwpt?

    I can't make more than one account with chat on clubwpt? i know several players that has made as many as 20 accounts with chat.I can make accounts but clubwpt will not give me chat,they must have my IP address ,because their response is " you r allowed one account with chat only." But as I have said several players have several accounts with chat. Can anyone help me? Are there any programs or plugins that can do this?Any help at all will be greatly appreciate.

    Open another iCloud account for the other user.

  • How to insert data in a one-to-many relationship

    How do you insert data into the client, my model entity beans have a one-to-many relationship.
    PARENT ENTITY BEAN
    PARENT-ID
    PARENT-NAME
    The ejbCreate(Integer parentID,String name)
    CHILD ENTITY BEAN
    CHILD-ID
    CHILD-NAME
    PARENT-ID(foreign key of PARENTID).
    ejbCreate(Integer parentID,String name,String foreignparentID)
    In a jsp page i collect the parent details and 3 corresponding chld details in a text box.
    Can you please tell me how do i proceed from here...
    ie. how to i insert data into the entity beans..
    Do i pass the child as a collection, and within parents ejbCreate() method do i lookup for the childs home interface and insert one -by -one from the collection.
    1. Considering the above example, can some one pls tell how the ejbCreate() mehod signatures, for the parent and child entity beans should be.
    2. Pls also show some sample client code as to how to make an insertion.
    3. In case you are passing a collection of child data, then in what format does one have to insert into a collection and also how does the container know how to insert the values in the child table , bcoz we are passing as a collection.
    4.In case collections cannot be inserted do we need to iterate into the collection in parent's ejbCreate() method, and manually insert into the database of the childtable, thereby creating child entity beans.
    Thanks for your time and support...
    regards
    kartik

    Hi,
    3. In this case of course child's ejbCreate(and postCreate) looks like
    ejbCreate(Integer childID,String name,ParentLocal parent) {
    setId(Id);
    setName(name);
    ejbPostCreate(Integer childID,String name,ParentLocal parent) {
    setParent(parent);
    Here you don't need IDs, but it happens only using Locals, not Remotes, if I'm not wrong. Container does it itself.
    1. Of course, if you have parent.getChildren() and parent.setChildren() then you don't need any loops, but it should be done anyway in postCreate, because in ejbCreate there no parent exists yet.
    Once more 3: example - I'm using JBoss 3.2.5 as EJB container. It has tomcat inside and EJB and JSP+Struts use the same jvm. It means for me that I don't need to use remote interfaces, just locals. And in this case I can implement ejb-relations. So, a have the abstract method parent.getChildren() which returns Collection of ChildLocal - s and method parent.setChildren(Collection childrenLocals) which creates/modifies children by itself.
    I have not used remotes for a long time, but as I remember it was not possible to implement ejb-relations using remotes.
    regards,
    Gio

  • Problem inserting one-to-many collection

    Hi,
    I've been trying to get an object (CMDMessage) that has a one-to-many collection (CMDMessageXREF)
    inserted into the database, but no matter what I try I can't seem to get the collection to grab the
    foreign key value of 'msg_id' to populate that field in the CMDMessageXREF object, I keep getting a nul value.
    From reading the forums, it seems the best way to get this value is to setup a back reference one-to-one mapping from the collection to the parent
    object, but this doesn't seem to be working from me.
    I've attached the pertinent client code as well as the pertinent information from the descriptors and would
    appreciate any help on this.
    Thanks,
    Mark
    Client code:
    CMDMessage note = new CMDMessage();
    note.setAuthorId(new Double(58402));
    note.setMsgSubject("Sequence test2");
    java.util.ArrayList xrefCollection = new java.util.ArrayList();
    CMDMessageXREF xref = new CMDMessageXREF();
    xref.setRecipientId(new Double(58400));
    xref.setRecipientType("org");
    xrefCollection.add(xref);
    note.setCmdMessageXrefCollection(xrefCollection);
    // runs transaction     invoking UnitOfWork to insert objects
    TransactionEngine.insert(note);
    Descriptors:
    public Descriptor buildCMDMessageDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(CMDMessage.class);
         descriptor.addTableName("CMD_MESSAGE");
         descriptor.addPrimaryKeyFieldName("CMD_MESSAGE.MSG_ID");
         // Descriptor properties.
         descriptor.useNoIdentityMap();
         descriptor.setIdentityMapSize(1000);
         descriptor.useRemoteNoIdentityMap();
         descriptor.setRemoteIdentityMapSize(1000);
         descriptor.setSequenceNumberFieldName("CMD_MESSAGE.MSG_ID");
         descriptor.setSequenceNumberName("CMD_MSG_ID_SEQUENCE");
         descriptor.alwaysConformResultsInUnitOfWork();
         descriptor.onlyRefreshCacheIfNewerVersion();
         descriptor.setAlias("CMDMessage");
         // Query manager.
         descriptor.useChangedFieldsLocking();
         descriptor.getQueryManager().checkDatabaseForDoesExist();
         //Named Queries
         // Event manager.
         // Mappings.
         DirectToFieldMapping msgIdMapping = new DirectToFieldMapping();
         msgIdMapping.setAttributeName("msgId");
         msgIdMapping.setGetMethodName("getMsgId");
         msgIdMapping.setSetMethodName("setMsgId");
         msgIdMapping.setFieldName("CMD_MESSAGE.MSG_ID");
         descriptor.addMapping(msgIdMapping);
         DirectToFieldMapping msgSubjectMapping = new DirectToFieldMapping();
         msgSubjectMapping.setAttributeName("msgSubject");
         msgSubjectMapping.setGetMethodName("getMsgSubject");
         msgSubjectMapping.setSetMethodName("setMsgSubject");
         msgSubjectMapping.setFieldName("CMD_MESSAGE.MSG_SUBJECT");
         descriptor.addMapping(msgSubjectMapping);
         OneToManyMapping cmdMessageXrefCollectionMapping = new OneToManyMapping();
         cmdMessageXrefCollectionMapping.setAttributeName("cmdMessageXrefCollection");
         cmdMessageXrefCollectionMapping.setGetMethodName("getCmdMessageXrefCollection");
         cmdMessageXrefCollectionMapping.setSetMethodName("setCmdMessageXrefCollection");
         cmdMessageXrefCollectionMapping.setReferenceClass(CMDMessageXREF.class);
         cmdMessageXrefCollectionMapping.useTransparentCollection();
         cmdMessageXrefCollectionMapping.useCollectionClass(oracle.toplink.indirection.IndirectList.class);
         cmdMessageXrefCollectionMapping.readOnly();
         cmdMessageXrefCollectionMapping.addTargetForeignKeyFieldName("CMD_MESSAGE_XREF.MSG_ID", "CMD_MESSAGE.MSG_ID");
         descriptor.addMapping(cmdMessageXrefCollectionMapping);
         return descriptor;
    public Descriptor buildCMDMessageXREFDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(CMDMessageXREF.class);
         descriptor.addTableName("CMD_MESSAGE_XREF");
         descriptor.addPrimaryKeyFieldName("CMD_MESSAGE_XREF.ID");
         // Descriptor properties.
         descriptor.useNoIdentityMap();
         descriptor.setIdentityMapSize(1000);
         descriptor.useRemoteNoIdentityMap();
         descriptor.setRemoteIdentityMapSize(1000);
         descriptor.setSequenceNumberFieldName("CMD_MESSAGE_XREF.ID");
         descriptor.setSequenceNumberName("CMD_MSG_XREF_ID_SEQ");
         descriptor.alwaysConformResultsInUnitOfWork();
         descriptor.onlyRefreshCacheIfNewerVersion();
         descriptor.setAlias("CMDMessageXREF");
         // Query manager.
         descriptor.useChangedFieldsLocking();
         descriptor.getQueryManager().checkDatabaseForDoesExist();
         //Named Queries
         // Event manager.
         // Mappings.
         DirectToFieldMapping idMapping = new DirectToFieldMapping();
         idMapping.setAttributeName("id");
         idMapping.setGetMethodName("getId");
         idMapping.setSetMethodName("setId");
         idMapping.setFieldName("CMD_MESSAGE_XREF.ID");
         descriptor.addMapping(idMapping);
         DirectToFieldMapping msgIdMapping = new DirectToFieldMapping();
         msgIdMapping.setAttributeName("msgId");
         msgIdMapping.setGetMethodName("getMsgId");
         msgIdMapping.setSetMethodName("setMsgId");
         msgIdMapping.setFieldName("CMD_MESSAGE_XREF.MSG_ID");
         descriptor.addMapping(msgIdMapping);
         DirectToFieldMapping recipientIdMapping = new DirectToFieldMapping();
         recipientIdMapping.setAttributeName("recipientId");
         recipientIdMapping.setGetMethodName("getRecipientId");
         recipientIdMapping.setSetMethodName("setRecipientId");
         recipientIdMapping.setFieldName("CMD_MESSAGE_XREF.RECIPIENT_ID");
         descriptor.addMapping(recipientIdMapping);
         OneToOneMapping cmdMessageInfoMapping = new OneToOneMapping();
         cmdMessageInfoMapping.setAttributeName("cmdMessageInfo");
         cmdMessageInfoMapping.setGetMethodName("getCmdMessageInfoHolder");
         cmdMessageInfoMapping.setSetMethodName("setCmdMessageInfoHolder");
         cmdMessageInfoMapping.setReferenceClass(CMDMessage.class);
         cmdMessageInfoMapping.useBasicIndirection();
         cmdMessageInfoMapping.readOnly();
         cmdMessageInfoMapping.addTargetForeignKeyFieldName("CMD_MESSAGE.MSG_ID", "CMD_MESSAGE_XREF.MSG_ID");
         descriptor.addMapping(cmdMessageInfoMapping);
         return descriptor;
    }

    Chris,
    Ok, I've tried both approaches
    1. using direct field mapping, getting rid of the one to one mapping on the CMDMessageXREF object, and adding this line xref.setMsgId( note.getMsgId()
    and
    2. removing the readOnly line for the mappings and setting the CMDMessage in the CMDMessageXREF object as shown below in bold.
    but still am getting the same error. Could this be because the MSG_ID field in the database is NOT NULL? Otherwise, I am not seeing what else I can do differently to set this up. Below is the updated relevant code and descriptor showing the second approach I used.
    Thanks for the help,
    Mark
    Client code
    CMDMessage note = new CMDMessage();
    note.setAuthorId(new Double(58402));
    note.setMsgSubject("Sequence test2");
    java.util.ArrayList xrefCollection = new java.util.ArrayList();
    CMDMessageXREF xref = new CMDMessageXREF();
    xref.setRecipientId(new Double(58400));
    // added to set value to valueHolder
    xref.setCmdMessageInfo(note);
    xrefCollection.add(xref);
    note.setCmdMessageXrefCollection(xrefCollection);
    TransactionEngine.insert(note);
    Descriptors
    public Descriptor buildCMDMessageDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(CMDMessage.class);
         descriptor.addTableName("CMD_MESSAGE");
         descriptor.addPrimaryKeyFieldName("CMD_MESSAGE.MSG_ID");
         // Descriptor properties.
         descriptor.useNoIdentityMap();
         descriptor.setIdentityMapSize(1000);
         descriptor.useRemoteNoIdentityMap();
         descriptor.setRemoteIdentityMapSize(1000);
         descriptor.setSequenceNumberFieldName("CMD_MESSAGE.MSG_ID");
         descriptor.setSequenceNumberName("CMD_MSG_ID_SEQUENCE");
         descriptor.alwaysConformResultsInUnitOfWork();
         descriptor.onlyRefreshCacheIfNewerVersion();
         descriptor.setAlias("CMDMessage");
         // Query manager.
         descriptor.useChangedFieldsLocking();
         descriptor.getQueryManager().checkDatabaseForDoesExist();
         //Named Queries
         // Event manager.
         // Mappings.
         DirectToFieldMapping msgIdMapping = new DirectToFieldMapping();
         msgIdMapping.setAttributeName("msgId");
         msgIdMapping.setGetMethodName("getMsgId");
         msgIdMapping.setSetMethodName("setMsgId");
         msgIdMapping.setFieldName("CMD_MESSAGE.MSG_ID");
         descriptor.addMapping(msgIdMapping);
         OneToManyMapping cmdMessageXrefCollectionMapping = new OneToManyMapping();
         cmdMessageXrefCollectionMapping.setAttributeName("cmdMessageXrefCollection");
         cmdMessageXrefCollectionMapping.setGetMethodName("getCmdMessageXrefCollection");
         cmdMessageXrefCollectionMapping.setSetMethodName("setCmdMessageXrefCollection");
         cmdMessageXrefCollectionMapping.setReferenceClass(CMDMessageXREF.class);
         cmdMessageXrefCollectionMapping.useTransparentCollection();
         cmdMessageXrefCollectionMapping.useCollectionClass(oracle.toplink.indirection.IndirectList.class);
         cmdMessageXrefCollectionMapping.addTargetForeignKeyFieldName("CMD_MESSAGE_XREF.MSG_ID", "CMD_MESSAGE.MSG_ID");
         descriptor.addMapping(cmdMessageXrefCollectionMapping);
         return descriptor;
    public Descriptor buildCMDMessageXREFDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(CMDMessageXREF.class);
         descriptor.addTableName("CMD_MESSAGE_XREF");
         descriptor.addPrimaryKeyFieldName("CMD_MESSAGE_XREF.ID");
         // Descriptor properties.
         descriptor.useNoIdentityMap();
         descriptor.setIdentityMapSize(1000);
         descriptor.useRemoteNoIdentityMap();
         descriptor.setRemoteIdentityMapSize(1000);
         descriptor.setSequenceNumberFieldName("CMD_MESSAGE_XREF.ID");
         descriptor.setSequenceNumberName("CMD_MSG_XREF_ID_SEQ");
         descriptor.alwaysConformResultsInUnitOfWork();
         descriptor.onlyRefreshCacheIfNewerVersion();
         descriptor.setAlias("CMDMessageXREF");
         // Query manager.
         descriptor.useChangedFieldsLocking();
         descriptor.getQueryManager().checkDatabaseForDoesExist();
         //Named Queries
         // Event manager.
         // Mappings.
         DirectToFieldMapping idMapping = new DirectToFieldMapping();
         idMapping.setAttributeName("id");
         idMapping.setGetMethodName("getId");
         idMapping.setSetMethodName("setId");
         idMapping.setFieldName("CMD_MESSAGE_XREF.ID");
         descriptor.addMapping(idMapping);
         DirectToFieldMapping recipientIdMapping = new DirectToFieldMapping();
         recipientIdMapping.setAttributeName("recipientId");
         recipientIdMapping.setGetMethodName("getRecipientId");
         recipientIdMapping.setSetMethodName("setRecipientId");
         recipientIdMapping.setFieldName("CMD_MESSAGE_XREF.RECIPIENT_ID");
         descriptor.addMapping(recipientIdMapping);
         OneToOneMapping cmdMessageInfoMapping = new OneToOneMapping();
         cmdMessageInfoMapping.setAttributeName("cmdMessageInfo");
         cmdMessageInfoMapping.setGetMethodName("getCmdMessageInfoHolder");
         cmdMessageInfoMapping.setSetMethodName("setCmdMessageInfoHolder");
         cmdMessageInfoMapping.setReferenceClass(CMDMessage.class);
         cmdMessageInfoMapping.useBasicIndirection();
         cmdMessageInfoMapping.addTargetForeignKeyFieldName("CMD_MESSAGE.MSG_ID", "CMD_MESSAGE_XREF.MSG_ID");
    descriptor.addMapping(cmdMessageInfoMapping);
         return descriptor;
    }

  • Bad response in a Web Service on OC4J with many concurrrent clients

    We have a Web Service in a OC4J container, this Web Services invoke the business services from another complex application (another ear with EJBs in the same container) with RMI connections.
    We need this web service support many concurrent clients, but in our tests the performance is very bad, the web service supports ten concurrent clients in a long response time for all of them, (for one client the Web Service responses in 3 seconds / for 10 clients in 45 seconds) if we test with 20 concurrent clients, the web service can´t process at least 15 requests , the other 5 finish well
    What can I do to improve the performance with many concurrent clients (100 +)

    Hello,
    I am quite surprised...
    Could you please give us more information about your environment and behavior:
    1- which version of oracleAS, WS and J2EE are you using?
    2- do you have any information in the application log about possible source of error?
    3- Any information about performance of the different layers?
    Can you simplify the flow by creating the service in the same EAR than the EJB and void RMI calls for example?
    regards
    Tugdual Grall

  • Need an approach regarding reporting for a one-to-many primary-child relationship, where there are more than three child objects for a primary object for reporting purpose

    Business Scenario- We have a parent organization with 6 different Business Units.One BU requires 9 stages for for Opportunity(Tender) Tracking.The client requirement is to show the basic details of the tender at the header level and to show details specific to individual sales stage as different tabs.There will be multiple opportunity members added as opportunity team and will be responsible for capturing details specific to individual sales stage(tab). The Tab should be enabled and disabled based on the role. Reporting is required against each stage with specific fields of child objects against each opportunity.
    We created multiple children entities under the oportunity(one to many mapping) but we are unable to add more than 3 child objects for a primary object for reporting purpose.
    Kindly suggest what needs to be done to meet the requirement

    Can you provide the exact steps you took to  "created multiple children entities under the oportunity" ?
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • Multiple chat clients with Webcam support

    Hi;
    I switched to the mac and i was wondering if anyone knows a program that will let me connect to Yahoo, MSN, and AOL at the same time and use multiple accounts. I also want webcam support. Currently i use different programs and i would like to be able to chat from one program instead of 3. SO far i have found aMSN, but only works for msn and not the other chat clients. Anyone can help?
    Thanks

    I use Fire
    It handles like 6 different IM clients.... not sure about the video capabilities, but i use iChat on an AIM client for that.
    Beavis2084

  • Chat client Help

    I am writing a chat client in java and I was wondering how to change the color of the text for each person. What I mean is is it possible to have the text from one user display red and the text from another user display blue. Any help would be nice.

    Is there a way to format text with html using JEditorPane and/or JTextPane; Read the API. You will find links to the tutorials.

  • EJB relation One to Many - ClassCastException

    Hi !
    I created two CMP EJB entity Client and Address. There is a One to Many relation between them.
    When I deploy them on JBoss, I have no errors, and the correponding tables are created in the database. The EJB seems to work fine, but when I use a 'relation' method : myAddress.setClient(myClient) for instance. I get a ServerException.
    In the log of JBoss there is :
    ClassCastException : org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.SetInstanceValue(...)
    I think I have a problem in my descriptors or JBoss configuration.
    If u have an idea ...
    Thx

    sorry to whack a load of code in but i can't see where the problem is here is my ejb-jar.xml file:
    <ejb-jar>
         <enterprise-beans>
              <entity>
                   <description>This bean represents a copy item.</description>
                   <ejb-name>CopyEJB</ejb-name>
                   <home>com.RemoteCopyHome</home>
                   <remote>com.RemoteCopy</remote>
                   <local-home>com.LocalCopyHome</local-home>
                   <local>com.LocalCopy</local>
                   <ejb-class>com.CopyBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.String</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Copy</abstract-schema-name>
                   <cmp-field>
                        <field-name>copyid</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>quality</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>buyinprice</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>selloutprice</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookid</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>title</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>genre</field-name>
                   </cmp-field>
                   <primkey-field>copyid</primkey-field>
                   <security-identity>
                        <description></description>
                        <use-caller-identity></use-caller-identity>
                   </security-identity>
              </entity>
              <entity>
                   <description>This bean represents a supplier.</description>
                   <ejb-name>SupplierEJB</ejb-name>
                   <home>com.RemoteSupplierHome</home>
                   <remote>com.RemoteSupplier</remote>
                   <local-home>com.LocalSupplierHome</local-home>
                   <local>com.LocalSupplier</local>
                   <ejb-class>com.SupplierBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.String</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Supplier</abstract-schema-name>
                   <cmp-field>
                        <field-name>supplierid</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>name</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>address1</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>address2</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>address3</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>address4</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>postcode</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>email</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>telno</field-name>
                   </cmp-field>
                   <primkey-field>supplierid</primkey-field>
                   <security-identity>
                        <description></description>
                        <use-caller-identity></use-caller-identity>
                   </security-identity>
              </entity>
              <entity>
                   <description>This bean represents an edition.</description>
                   <ejb-name>EditionEJB</ejb-name>
                   <home>com.RemoteEditionHome</home>
                   <remote>com.RemoteEdition</remote>
                   <local-home>com.LocalEditionHome</local-home>
                   <local>com.LocalEdition</local>
                   <ejb-class>com.EditionBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.String</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Edition</abstract-schema-name>
                   <cmp-field>
                        <field-name>editionid</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>isbn</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>publisher</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>binding</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>other</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>edition</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>printdate</field-name>
                   </cmp-field>
                   <primkey-field>editionid</primkey-field>
                   <security-identity>
                        <description></description>
                        <use-caller-identity></use-caller-identity>
                   </security-identity>
              </entity>
              <entity>
                   <description>This bean represents an author.</description>
                   <ejb-name>AuthorEJB</ejb-name>
                   <home>com.RemoteAuthorHome</home>
                   <remote>com.RemoteAuthor</remote>
                   <local-home>com.LocalAuthorHome</local-home>
                   <local>com.LocalAuthor</local>
                   <ejb-class>com.AuthorBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.String</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Author</abstract-schema-name>
                   <cmp-field>
                        <field-name>authorid</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>name</field-name>
                   </cmp-field>
                   <primkey-field>authorid</primkey-field>
                   <security-identity>
                        <description></description>
                        <use-caller-identity></use-caller-identity>
                   </security-identity>
              </entity>
              <session>
                   <description>Supplier Function Session Bean</description>
                   <display-name>SupplierFunctionEJB</display-name>
                   <ejb-name>SupplierFunctionEJB</ejb-name>
                   <home>com.SupplierFunctionHome</home>
                   <remote>com.SupplierFunctionRemote</remote>
                   <ejb-class>com.SupplierFunctionSBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
              </session>
              <session>
                   <description>Copy Function Session Bean</description>
                   <display-name>CopyFunctionEJB</display-name>
                   <ejb-name>CopyFunctionEJB</ejb-name>
                   <home>com.CopyFunctionHome</home>
                   <remote>com.CopyFunctionRemote</remote>
                   <ejb-class>com.CopyFunctionSBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
              </session>
         </enterprise-beans>
         <relationships>
              <ejb-relation>
                   <ejb-relation-name>Supplier-Copy</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>copy-recievedfrom-supplier</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <cascade-delete></cascade-delete>
                        <relationship-role-source>
                             <ejb-name>CopyEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>supplier</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>supplier-has-items</ejb-relationship-role-name>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>SupplierEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
              <ejb-relation>
                   <ejb-relation-name>Edition-Copy</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>edition-has-items</ejb-relationship-role-name>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>EditionEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>copy-is-a-edition</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <cascade-delete></cascade-delete>
                        <relationship-role-source>
                             <ejb-name>CopyEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>edition</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
              <!--<ejb-relation>
                   <ejb-relation-name>Author-Copy</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>copy-has-items</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>                                     
        <relationship-role-source>
                             <ejb-name>AuthorEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>copies</cmr-field-name>
                             <cmr-field-type>java.util.Set</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>copy-has-authors</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <cascade-delete></cascade-delete>
                        <relationship-role-source>
                             <ejb-name>CopyEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>authors</cmr-field-name>
                     <cmr-field-type>java.util.Set</cmr-field-type>     
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>-->
         </relationships>
         <assembly-descriptor>
              <security-role>
                   <description>This role represents everyone who is allowed full access
             to the beans.</description>
                   <role-name>Subscribers</role-name>
              </security-role>
              <method-permission>
                   <role-name>Subscribers</role-name>
                   <method>
                        <ejb-name>CopyEJB</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <method>
                        <ejb-name>SupplierEJB</ejb-name>
                        <method-name>*</method-name>
                   </method>
              </method-permission>
              <container-transaction>
                   <method>
                        <ejb-name>CopyEJB</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <method>
                        <ejb-name>SupplierEJB</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>my session bean code can be found at
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=11&t=006578

  • Building a simple J2ME chat client (for own J2SE-based server) Threading Qs

    Hi!
    I am making my own simple chat / messenger service to use between a couple of friends over GPRS.
    On the server side i have made a multi threaded TCP server that opens a new thread for each connecting client and stores these socket connections in a hashtable for access to send data between each thread.
    So when a client logs on to the server, the server sends a printwriter message to all other clients informing them of what client connected, and the clients can put the username in its out-database. then the clients can send messages to each others using a simple, self build protocol.
    All connection between clients/server happens over a simple printwriter on in/out streams.
    Problem is: it works perfectly most of the time.... However, sometimes a message is mysteriously lost when transferred from the server to a client. Transfer from client to server works flawlessly. I am thinking that it might have something to do with the client side threading, or slow network transfer casuing a TCP read error.
    Client structure is as following:
    start-> Midlet class -> (press connect to server) -> new Client class (impl runnable) -> new thread(this) -> void run() sets up all connections and writers, waits in a while loop for messages from server and takes action according to message type. -> Button(send) uses output stream to send a message to server.
    Do anyone have any suggestions on what I must consider when making a client that will simultaniously be able to listen for data from server as well as send data to server over 1 socket and slow mobile connection without causing any trouble?
    More info can be provided if necessary.
    Thank you!

    Building a simple J2ME chat client (for own J2SE-based server)a. i would like to say that this is a bl00dy brilliant idea. i mean ~ its been done before but building one yourself is quite thrilling.
    b. are u using java 4 or java 5. ?
    sometimes a message is mysteriously lost when transferred from the server to a client. Transfer from client to server works flawlessly.are you using push registry to recieve incoming connections.
    i recommend using a StreamConnectionNotifier connection instead of just a socket connection. you could send your data (xml/plain text) just like a stream (tcp ofcourse). if you want to know how to use a StreamConnectionNotifier connection, here's how
    try{
    // listen at local port 789
    StreamConnectionNotifier notify = (StreamConnectionNotifier) Connector.open(“http://:789”);
    // infinite loop to get incoming connections
    for(;;)
    StreamConnection stream = notify.acceptandOpen();  // return a stream connection when a connection is made
    InputStrean mystream = stream.openInputStream();
    while(mystream!=-1)
    mystream.read();
    ....cheers

  • Chat Client - JTextPane

    I am trying to build a chat client, within an Applet, communicating with a Java server. I have written the server code, and built all communications (prototyped as a command line tool first, and its all working).
    My only problem now is getting the messages displayed correctly in the chat client.
    I have two problems I am trying to solve
    1) I want the username in a different color to the message
    2) I want the message to wrap, if it goes over a single line
    I have been at this for most of the day, trying different techniques, but the text either does not display at all, or I can only get one of the two problems solved, and not both together.
    I have tried lost of tips already, from previous posts, but not sure if I am doing something wrong, or if it is the applet causing the problem.
    All help would be greatly appreciated.
    Thanks
    Wayne

    My only problem now is getting the messages displayed correctly in the chat client.Start simple. Are you able to display both the user name and the chat text in the client, regardless of color and wrapping?
    I have two problems I am trying to solve
    1) I want the username in a different color to the messageIs using HTML an option? Most (all?) Swing components support text with HTML markup for e.g., colors, style,...
    2) I want the message to wrap, if it goes over a single lineMost (all?) JTextComponent subclasses support line wrapping. Well, OK, not JTextField descendants.
    I have been at this for most of the day, trying different techniques, but the text either does not display at all, or I can only get one of the two problems solved, and not both together.
    I have tried lost of tips already, from previous posts,Which tips? What did you try? What didn't work?
    I'm not nit-picking, but there are several ways we could suggest (e.g. JEditorPane), but why spend time describing them if you already have tried them... Have you read [how to use Editor Pane|http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html] (non-editable version) from the Java tutorial?
    Note than a simpler solution could be to display the user name in a JLabel with some color, and the chat text in a JTextPane or in an uneditable JTExtArea, with line-wrapping enabled, in another color. Not sure if that fulfills your requirements in terms of display.
    but not sure if I am doing something wrong, or if it is the applet causing the problem.Probably not "the applet". But for the sake of simplicity, have you tried running the chat client as a standalone Java app?

  • One-to-many biderectional relationship

    Hello, I am trying to create a one-to-many biderectional relationship between NewsengContent(1) and NewsengProperty(many) entities.
    Inside NewsengContent, I define a collection of NewsengProperty's as:
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "contentId", fetch=FetchType.EAGER)
    private Collection<NewsengProperty> newsengPropertyCollection;In NewsengProperty I define the contentId as FK to NewsengContent:
    @ManyToOne
    @JoinColumn(name = "content_id", referencedColumnName = "id")
    private NewsengContent contentId;
        In the client code these are used as:
    List<NewsengProperty> props = new ArrayList<NewsengProperty>();
    NewsengContent nc = new NewsengContent();
      nc.setNewsengPropertyCollection(properties);Eventually all data gets populated fine except that content_id column always comes out null.
    Could anyone help me with this?
    Thanks!

    the problem was that I had to add following code to client:
    for (NewsengProperty np: properties ) {
                np.setContentId(nc);
            nc.setNewsengPropertyCollection(properties);

  • One-to-Many CMR problem

    I am trying to get Container Managed Relationships working with Oracle Application Server. I am sure that the problem it quite obvious to anyone who has got this working before, but after carefully following numerous examples, I still cant get them to work. I have various issues including the application server blocking when it calls the getB() method in "A" to populate the items from table "B", even though the generated SQL looks okay e.g., "select B_PK from B where (b_fk = 1)".
    I would be extremely grateful if you could point out my (hopefully obvious) mistake as I wrestled with it for the past couple of weeks.
    Any ideas?
    Cheers,
    Jonathan
    I have two tables A and B; A has a one-to-many relationship with B:
    Table A:
         A_PK          (primary key)
         A_NAME
    Table B:
         B_PK          (primary key)
         B_NAME
         B_FK          (foreign key to table A)
    My ejb-jar.xml file is:
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>A</display-name>
    <ejb-name>A</ejb-name>
    <home>mypackage1.AHome</home>
    <remote>mypackage1.A</remote>
    <local-home>mypackage1.ALocalHome</local-home>
    <local>mypackage1.ALocal</local>
    <ejb-class>mypackage1.impl.ABean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>A</abstract-schema-name>
    <cmp-field><field-name>a_pk</field-name></cmp-field>
    <cmp-field><field-name>a_name</field-name></cmp-field>
    <primkey-field>a_pk</primkey-field>
    </entity>
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>B</display-name>
    <ejb-name>B</ejb-name>
    <home>mypackage1.BHome</home>
    <remote>mypackage1.B</remote>
    <local-home>mypackage1.BLocalHome</local-home>
    <local>mypackage1.BLocal</local>
    <ejb-class>mypackage1.impl.BBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>B</abstract-schema-name>
    <cmp-field><field-name>b_pk</field-name></cmp-field>
    <cmp-field><field-name>b_name</field-name></cmp-field>
    <cmp-field><field-name>b_fk</field-name></cmp-field>
    <primkey-field>b_pk</primkey-field>
    </entity>
    </enterprise-beans>
    <relationships>
    <ejb-relation>
    <ejb-relation-name>A-B</ejb-relation-name>
    <ejb-relationship-role>
    <multiplicity>One</multiplicity>
    <cascade-delete/>
    <relationship-role-source>
    <ejb-name>A</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>b</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>B</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    </ejb-jar>
    And my orion-ejb-jar.xml file is:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
    <enterprise-beans>
    <entity-deployment name="A" copy-by-value="false" data-source="jdbc/Connection1DS" exclusive-write-access="false" table="a">
    <primkey-mapping>
    <cmp-field-mapping name="a_pk" persistence-name="a_pk"
    persistence-type="int(11)"/>
    </primkey-mapping>
    <cmp-field-mapping name="a_pk" persistence-name="a_pk"
    persistence-type="int(11)"/>
    <cmp-field-mapping name="a_name" persistence-name="a_name"
    persistence-type="varchar(100)"/>
    <cmp-field-mapping name="b">
    <collection-mapping table="B">
    <primkey-mapping>
    <cmp-field-mapping name="b_fk" persistence-name="B_FK"/>
    </primkey-mapping>
    <value-mapping type="mypackage1.BLocal">
    <cmp-field-mapping>
    <entity-ref home="B">
    <cmp-field-mapping name="b_pk" persistence-name="B_PK"/>
    </entity-ref>
    </cmp-field-mapping>
    </value-mapping>
    </collection-mapping>
    </cmp-field-mapping>
    </entity-deployment>
    <entity-deployment name="B" copy-by-value="false" data-source="jdbc/Connection1DS" exclusive-write-access="false" table="b">
    <primkey-mapping>
    <cmp-field-mapping name="b_pk" persistence-name="b_pk"
    persistence-type="int(11)"/>
    </primkey-mapping>
    <cmp-field-mapping name="b_pk"
    persistence-name="b_pk" persistence-type="int(11)"/>
    <cmp-field-mapping name="b_fk" persistence-name="b_fk"
    persistence-type="int(11)"/>
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping impliesAll="true" name="&lt;default-ejb-caller-role>"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>

    Ok, I found out something strange. If I do the addPet operation twice in the client the new relationship is created, too.
    p = home.create("Violetta");
    p.addNewPet("Jenny");
    p = home.create("Frank");
    p.addPet("Jenny");
    p.addPet("Jenny");
    May this be a timing problem? Or is there a command I could execute to ensure all data manipulation is populated to the DB. (Like close() in JDBC)
    TIA
    Frank

  • One-Way video chat PC to Mac

    Hi,
    My father and I both have iBook G4s but no webcams. My sister and brother-in-law are on a PC laptop with a webcam and using AIM. They have a new baby that we all want to see, but they don't care that much about seeing us. Can we do a one-way chat with video from them if we don't have video on our end?
    We have not had success getting this set up so far, and I wanted to make sure it was even possible before spending too much more time trying to make it work.
    Thank you very much!

    I hate to disagree with the much more knowledgeable people here, but it is possible to have a one-way video chat with AIM 5.9 (with cam) and Mac (no cam). I know that, because I did it for quite some time with my sister, who lives abroad, before I bought my iSight.
    Of course, I also know that I'm in a tiny minority of people who have been able to do this, but it is possible. That said, I have no idea why it worked for us, with the same settings as everyone else uses, and didn't for so many others. I guess the planets were aligned just right -- or maybe it had to do with us being identical twins and the powers that be felt sorry for us living so far apart. Sorry I can't be more help, though.

Maybe you are looking for