Open topic with navigation

TIBCO® Enterprise Administrator 2.4.2

# How to Unshare a TeaObject

It is a good practice to unshare a shared object after the purpose for sharing it is complete.

Below is an example of how to unshare a TeaObject after it has been shared:

    @TeaOperation(name = "unsharePerson", description = "Unshare a Person object")
    public void unsharePerson() throws IOException {
      // Person implements TeaObject and has objectTypeName="Person" in this instance
      // the key="John"
    final Person person = new Person("John", "Public John Person");
      //teaAgentServer is an instance of com.tibco.tea.agent.server.TeaAgentServer or
      // com.tibco.tea.agent.server.TeaAgentServlet
    final TeaPersistence persistence = teaAgentServer.getPersistence();
    persistence.unshare(person);
    }

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Enterprise Administrator

Copyright © 1996-2025. Cloud Software Group, Inc. All Rights Reserved.