weblogic-deploy-tooling icon indicating copy to clipboard operation
weblogic-deploy-tooling copied to clipboard

Enhance modelHelp to provide bean and attribute help

Open tbarnes-us opened this issue 3 years ago • 7 comments

The modelHelp tool would be more helpful if it could also provide WL attribute help instead of logging a somewhat confusing 'not a folder error' when an Attribute name is referenced on its command line, or at least the tool could generate an Info that lets the user know they've hit an attribute (instead of an error).

If you want to pursue the attribute help generation, I wrote a fairly hacky but short java program a few years ago that dips into the mbean descriptors, parses their help text, and dumps output. For example:

$ java -cp "$CLASSPATH:." Beany -bean weblogic.j2ee.descriptor.wl.UniformDistributedTopicBean -prop ForwardingPolicy -margin 100000
Bean = weblogic.j2ee.descriptor.wl.UniformDistributedTopicBean

  package=weblogic.j2ee.descriptor.wl
  interfaceclassname=weblogic.j2ee.descriptor.wl.UniformDistributedTopicBean
  generatedByWLSInfoBinder=true
  rolesAllowed=[Ljava.lang.String;@4229bb3f
  description=

A uniform distributed topic is a distributed topic whose members are configured as part of its configuration; since members share the same configuration, they are uniform.  There is one member on each JMS Server that conforms to the targeting criteria of the uniform distributed topic.  For example, if a uniform distributed topic is targeted to a cluster, then one member will be created on each JMS server in the cluster.  Members are created and destroyed as the targeting is changed.
 


PROPERTY

  name=ForwardingPolicy
  property type=class java.lang.String
  hidden=false
  legalValues=Partitioned, Replicated
  default=Replicated
  dynamic=false
  description=

 The uniform distributed topic message Forwarding Policy specifies whether a sent message is forwarded to all members. 
  
The valid values are:
 
 
   * <b>Replicated</b> - The default. All physical topic members receive each sent message. If a message arrives at one of the physical topic members, a copy of this message is forwarded to the other members of that uniform distributed topic. A subscription on any one particular member will get a copy of any message sent to the uniform distributed topic logical name or to any particular uniform distributed topic member.
  
   * <b>Partitioned</b> - The physical member receiving the message is the only member of the uniform distributed topic that is aware of the message. When a message is published to the logical name of a Partitioned uniform distributed topic, it will only arrive on one particular physical topic member. Once a message arrives on a physical topic member, the message is not forwarded to the rest of the members of the uniform distributed destination, and subscribers on other physical topic members do not get a copy of that message. The Partitioned capability was added in WebLogic 10.3.4 (11gR1PS3).
 
 
A publisher that uses a logical JNDI name of a Replicated distributed topic is created on one member and every send call  publishes messages to the same member regardless the value of the "Load Balancing Enabled" attribute. This is behavior is backward compatible with previous WebLogic Server releases when using a uniform distributed topic. Under the same conditions, a Partitioned distributed topic publishes to the same member only when the value of the "Load Balancing Enabled" attribute is set to false. If the value of the "Load Balancing Enabled" attribute is to true, a publisher to a Partitioned distributed topic publishes messages that are load balanced accross all the members of the uniform distributed topic. 
  
Most new applications will use the new Partitioned forwarding policy in combination with a logical subscription topology on a uniform distributed topic that consists of: (1) a same named physical subscription created directly on each physical member, (2) a Client ID Policy of Unrestricted, and (3) a Subscription Sharing Policy of "Sharable". WL 10.3.4 Message Driven Beans (MDBs) provides a Topic Messages Distribution Mode option to automatically setup this kind of topology.
  
 Note: This attribute is ignored by standalone/singleton Topics, it only applies to distributed topics.

Let me know if you want the program...

tbarnes-us avatar Sep 16 '21 00:09 tbarnes-us

that would really be useful. right now i have to guess and google and guess again what each attribute is doing.

dimovelev avatar Nov 20 '21 11:11 dimovelev

hey @ddsharpe and @mriccell - now we have two votes for this - maybe i'll cave and code this up myself one of these times :)

@dimovelev in the meantime there's a reference for the mbeans that has the same material: https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/wlmbr/core/index.html

tbarnes-us avatar Nov 20 '21 19:11 tbarnes-us

@tbarnes-us thank you very much. that is really helpful! Definitely a must have for the model help.

dimovelev avatar Nov 21 '21 15:11 dimovelev

Assigning to Tom.

robertpatrick avatar Jan 03 '22 21:01 robertpatrick

I've created internal JIRA OWLS-95241 to track this work.

tbarnes-us avatar Jan 03 '22 22:01 tbarnes-us

Moving JIRA to WDT project (WDT-596) for visibility purposes

robertpatrick avatar Jan 14 '22 19:01 robertpatrick

Now merged into "main" from https://github.com/oracle/weblogic-deploy-tooling/pull/1148

tbarnes-us avatar Jul 20 '22 22:07 tbarnes-us

This feature will be available in the next release.

tbarnes-us avatar Aug 16 '22 19:08 tbarnes-us

See https://github.com/oracle/weblogic-deploy-tooling/pull/1148 for usage...

tbarnes-us avatar Aug 16 '22 19:08 tbarnes-us