1 7 package org.jboss.ejb3.dd; 8 9 import java.util.StringTokenizer ; 10 11 import org.xml.sax.Attributes ; 12 import org.jboss.logging.Logger; 13 import org.jboss.xb.binding.UnmarshallingContext; 14 import org.jboss.xb.binding.ObjectModelFactory; 15 16 23 public class EjbJarDDObjectFactory implements ObjectModelFactory 24 { 25 26 private static final Logger log = Logger 27 .getLogger(EjbJarDDObjectFactory.class); 28 29 32 public Object newRoot(Object root, UnmarshallingContext navigator, 33 String namespaceURI, String localName, Attributes attrs) 34 { 35 36 final EjbJarDD dd; 37 if (root == null) 38 { 39 root = dd = new EjbJarDD(); 40 } else 41 { 42 dd = (EjbJarDD) root; 43 } 44 45 if (attrs.getLength() > 0) 46 { 47 for (int i = 0; i < attrs.getLength(); ++i) 48 { 49 if (attrs.getLocalName(i).equals("version")) 50 { 51 dd.setVersion(attrs.getValue(i)); 52 } 53 } 54 } 55 56 return root; 57 } 58 59 public Object completeRoot(Object root, UnmarshallingContext ctx, 60 String uri, String name) 61 { 62 return root; 63 } 64 65 67 70 public Object newChild(EjbJarDD dd, UnmarshallingContext navigator, 71 String namespaceURI, String localName, Attributes attrs) 72 { 73 Object child = null; 74 75 if (localName.equals("enterprise-beans")) 76 { 77 child = new EnterpriseBeans(); 78 } else if (localName.equals("relationships")) 79 { 80 child = new Relationships(); 81 } else if (localName.equals("assembly-descriptor")) 82 { 83 child = new AssemblyDescriptor(); 84 } 85 86 return child; 87 } 88 89 92 public Object newChild(EnterpriseBeans ejbs, UnmarshallingContext navigator, 93 String namespaceURI, String localName, Attributes attrs) 94 { 95 Object child = null; 96 97 if (localName.equals("session")) 98 { 99 child = new SessionEnterpriseBean(); 100 } else if (localName.equals("entity")) 101 { 102 child = new EntityEnterpriseBean(); 103 } else if (localName.equals("message-driven")) 104 { 105 child = new MessageDrivenBean(); 106 } 107 108 return child; 109 } 110 111 114 private Object newEjbChild(EnterpriseBean parent, String localName) 115 { 116 Object child = null; 117 118 if (localName.equals("ejb-local-ref")) 119 { 120 child = new EjbLocalRef(); 121 } else if (localName.equals("ejb-ref")) 122 { 123 child = new EjbRef(); 124 } else if (localName.equals("resource-ref")) 125 { 126 child = new ResourceRef(); 127 } else if (localName.equals("env-entry")) 128 { 129 child = new EnvEntry(); 130 } else if (localName.equals("message-destination-ref")) 131 { 132 child = new MessageDestinationRef(); 133 } 134 135 return child; 136 } 137 138 141 public Object newChild(MessageDrivenBean parent, 142 UnmarshallingContext navigator, String namespaceURI, String localName, 143 Attributes attrs) 144 { 145 Object child = null; 146 147 child = newEjbChild(parent, localName); 148 if (child == null) 149 { 150 if (localName.equals("message-driven-destination")) 151 { 152 child = new MessageDrivenDestination(); 153 } 154 } 155 156 return child; 157 } 158 159 162 public Object newChild(SessionEnterpriseBean parent, 163 UnmarshallingContext navigator, String namespaceURI, String localName, 164 Attributes attrs) 165 { 166 Object child = null; 167 168 child = newEjbChild(parent, localName); 169 if (child == null) 170 { 171 if (localName.equals("security-identity")) 172 { 173 child = new SecurityIdentity(); 174 } 175 } 176 177 return child; 178 } 179 180 183 public Object newChild(EntityEnterpriseBean parent, 184 UnmarshallingContext navigator, String namespaceURI, String localName, 185 Attributes attrs) 186 { 187 Object child = null; 188 189 child = newEjbChild(parent, localName); 190 if (child == null) 191 { 192 if (localName.equals("cmp-field")) 193 { 194 child = new CmpField(); 195 } else if (localName.equals("query")) 196 { 197 child = new Query(); 198 } 199 } 200 201 return child; 202 } 203 204 207 public Object newChild(SecurityIdentity parent, 208 UnmarshallingContext navigator, String namespaceURI, String localName, 209 Attributes attrs) 210 { 211 Object child = null; 212 213 if (localName.equals("use-caller-identity")) 214 { 215 parent.setUseCallerIdentity(true); 216 } 217 218 return child; 219 } 220 221 224 public Object newChild(Relationships relationships, 225 UnmarshallingContext navigator, String namespaceURI, String localName, 226 Attributes attrs) 227 { 228 Object child = null; 229 230 if (localName.equals("ejb-relation")) 231 { 232 child = new EjbRelation(); 233 } 234 235 return child; 236 } 237 238 241 public Object newChild(EjbRelation relation, UnmarshallingContext navigator, 242 String namespaceURI, String localName, Attributes attrs) 243 { 244 Object child = null; 245 246 if (localName.equals("ejb-relationship-role")) 247 { 248 child = new EjbRelationshipRole(); 249 } 250 251 return child; 252 } 253 254 257 public Object newChild(EjbRelationshipRole parent, 258 UnmarshallingContext navigator, String namespaceURI, String localName, 259 Attributes attrs) 260 { 261 Object child = null; 262 263 if (localName.equals("cascade-delete")) 264 { 265 parent.setCascadeDelete(true); 266 } else if (localName.equals("relationship-role-source")) 267 { 268 child = new RelationshipRoleSource(); 269 } else if (localName.equals("cmr-field")) 270 { 271 child = new CmrField(); 272 } 273 274 return child; 275 } 276 277 280 public Object newChild(AssemblyDescriptor relationships, 281 UnmarshallingContext navigator, String namespaceURI, String localName, 282 Attributes attrs) 283 { 284 Object child = null; 285 286 if (localName.equals("security-role")) 287 { 288 child = new SecurityRole(); 289 } else if (localName.equals("method-permission")) 290 { 291 child = new MethodPermission(); 292 } 293 if (localName.equals("container-transaction")) 294 { 295 child = new ContainerTransaction(); 296 } else if (localName.equals("inject")) 297 { 298 child = new Inject(); 299 } else if (localName.equals("callback")) 300 { 301 child = new Callback(); 302 } else if (localName.equals("exclude-list")) 303 { 304 child = new ExcludeList(); 305 } else if (localName.equals("remove-list")) 306 { 307 child = new RemoveList(); 308 } else if (localName.equals("init-list")) 309 { 310 child = new InitList(); 311 } 312 313 return child; 314 } 315 316 319 public Object newChild(Inject inject, 320 UnmarshallingContext navigator, String namespaceURI, String localName, 321 Attributes attrs) 322 { 323 Object child = null; 324 325 if (localName.equals("method")) 326 { 327 child = new Method(); 328 } 329 330 return child; 331 } 332 333 336 public Object newChild(Callback callback, 337 UnmarshallingContext navigator, String namespaceURI, String localName, 338 Attributes attrs) 339 { 340 Object child = null; 341 342 if (localName.equals("method")) 343 { 344 child = new Method(); 345 } 346 347 return child; 348 } 349 350 353 public Object newChild(MethodPermission permission, 354 UnmarshallingContext navigator, String namespaceURI, String localName, 355 Attributes attrs) 356 { 357 Object child = null; 358 359 if (localName.equals("method")) 360 { 361 child = new Method(); 362 } else if (localName.equals("unchecked")) 363 { 364 permission.setUnchecked(true); 365 } 366 367 return child; 368 } 369 370 373 public Object newChild(ExcludeList list, 374 UnmarshallingContext navigator, String namespaceURI, String localName, 375 Attributes attrs) 376 { 377 Object child = null; 378 379 if (localName.equals("method")) 380 { 381 child = new Method(); 382 } 383 384 return child; 385 } 386 387 390 public Object newChild(RemoveList list, 391 UnmarshallingContext navigator, String namespaceURI, String localName, 392 Attributes attrs) 393 { 394 Object child = null; 395 396 if (localName.equals("method")) 397 { 398 child = new Method(); 399 } 400 401 return child; 402 } 403 404 407 public Object newChild(InitList list, 408 UnmarshallingContext navigator, String namespaceURI, String localName, 409 Attributes attrs) 410 { 411 Object child = null; 412 413 if (localName.equals("method")) 414 { 415 child = new Method(); 416 } 417 418 return child; 419 } 420 421 424 public Object newChild(ContainerTransaction transaction, 425 UnmarshallingContext navigator, String namespaceURI, String localName, 426 Attributes attrs) 427 { 428 Object child = null; 429 430 if (localName.equals("method")) 431 { 432 child = new Method(); 433 } 434 435 return child; 436 } 437 438 441 public void addChild(EjbJarDD parent, EnterpriseBeans ejbs, 442 UnmarshallingContext navigator, String namespaceURI, String localName) 443 { 444 parent.setEnterpriseBeans(ejbs); 445 } 446 447 450 public void addChild(EnterpriseBeans parent, EnterpriseBean ejb, 451 UnmarshallingContext navigator, String namespaceURI, String localName) 452 { 453 parent.addEnterpriseBean(ejb); 454 } 455 456 459 public void addChild(SessionEnterpriseBean parent, SecurityIdentity si, 460 UnmarshallingContext navigator, String namespaceURI, String localName) 461 { 462 parent.setSecurityIdentity(si); 463 } 464 465 468 public void addChild(SessionEnterpriseBean parent, EjbLocalRef ref, 469 UnmarshallingContext navigator, String namespaceURI, String localName) 470 { 471 parent.addEjbLocalRef(ref); 472 } 473 474 477 public void addChild(SessionEnterpriseBean parent, EjbRef ref, 478 UnmarshallingContext navigator, String namespaceURI, String localName) 479 { 480 parent.addEjbRef(ref); 481 } 482 483 486 public void addChild(SessionEnterpriseBean parent, MessageDestinationRef ref, 487 UnmarshallingContext navigator, String namespaceURI, String localName) 488 { 489 parent.addMessageDestinationRef(ref); 490 } 491 492 495 public void addChild(SessionEnterpriseBean parent, EnvEntry entry, 496 UnmarshallingContext navigator, String namespaceURI, String localName) 497 { 498 parent.addEnvEntry(entry); 499 } 500 501 504 public void addChild(SessionEnterpriseBean parent, ResourceRef ref, 505 UnmarshallingContext navigator, String namespaceURI, String localName) 506 { 507 parent.addResourceRef(ref); 508 } 509 510 513 public void addChild(EntityEnterpriseBean parent, CmpField field, 514 UnmarshallingContext navigator, String namespaceURI, String localName) 515 { 516 parent.addCmpField(field); 517 } 518 519 522 public void addChild(EntityEnterpriseBean parent, Query query, 523 UnmarshallingContext navigator, String namespaceURI, String localName) 524 { 525 parent.addQuery(query); 526 } 527 528 531 public void addChild(EjbJarDD parent, Relationships relationships, 532 UnmarshallingContext navigator, String namespaceURI, String localName) 533 { 534 parent.setRelationships(relationships); 535 } 536 537 540 public void addChild(Relationships parent, EjbRelation relation, 541 UnmarshallingContext navigator, String namespaceURI, String localName) 542 { 543 parent.addEjbRelation(relation); 544 } 545 546 549 public void addChild(EjbRelation parent, EjbRelationshipRole role, 550 UnmarshallingContext navigator, String namespaceURI, String localName) 551 { 552 parent.addEjbRelationshipRole(role); 553 } 554 555 558 public void addChild(EjbRelationshipRole parent, 559 RelationshipRoleSource source, UnmarshallingContext navigator, 560 String namespaceURI, String localName) 561 { 562 parent.setRelationshipRoleSource(source); 563 } 564 565 568 public void addChild(EjbRelationshipRole parent, CmrField field, 569 UnmarshallingContext navigator, String namespaceURI, String localName) 570 { 571 parent.setCmrField(field); 572 } 573 574 577 public void addChild(EjbJarDD parent, AssemblyDescriptor descriptor, 578 UnmarshallingContext navigator, String namespaceURI, String localName) 579 { 580 parent.setAssemblyDescriptor(descriptor); 581 } 582 583 586 public void addChild(AssemblyDescriptor parent, SecurityRole role, 587 UnmarshallingContext navigator, String namespaceURI, String localName) 588 { 589 parent.addSecurityRole(role); 590 } 591 592 595 public void addChild(AssemblyDescriptor parent, MethodPermission permission, 596 UnmarshallingContext navigator, String namespaceURI, String localName) 597 { 598 parent.addMethodPermission(permission); 599 } 600 601 604 public void addChild(AssemblyDescriptor parent, ExcludeList list, 605 UnmarshallingContext navigator, String namespaceURI, String localName) 606 { 607 parent.setExcludeList(list); 608 } 609 610 613 public void addChild(AssemblyDescriptor parent, RemoveList list, 614 UnmarshallingContext navigator, String namespaceURI, String localName) 615 { 616 parent.setRemoveList(list); 617 } 618 619 622 public void addChild(AssemblyDescriptor parent, InitList list, 623 UnmarshallingContext navigator, String namespaceURI, String localName) 624 { 625 parent.setInitList(list); 626 } 627 628 631 public void addChild(AssemblyDescriptor parent, Inject inject, 632 UnmarshallingContext navigator, String namespaceURI, String localName) 633 { 634 parent.addInject(inject); 635 } 636 637 640 public void addChild(AssemblyDescriptor parent, Callback callback, 641 UnmarshallingContext navigator, String namespaceURI, String localName) 642 { 643 parent.addCallback(callback); 644 } 645 646 649 public void addChild(ExcludeList parent, Method method, 650 UnmarshallingContext navigator, String namespaceURI, String localName) 651 { 652 parent.addMethod(method); 653 } 654 655 658 public void addChild(RemoveList parent, Method method, 659 UnmarshallingContext navigator, String namespaceURI, String localName) 660 { 661 parent.addMethod(method); 662 } 663 664 667 public void addChild(InitList parent, Method method, 668 UnmarshallingContext navigator, String namespaceURI, String localName) 669 { 670 parent.addMethod(method); 671 } 672 673 676 public void addChild(MethodPermission parent, Method method, 677 UnmarshallingContext navigator, String namespaceURI, String localName) 678 { 679 parent.addMethod(method); 680 } 681 682 685 public void addChild(Inject parent, Method method, 686 UnmarshallingContext navigator, String namespaceURI, String localName) 687 { 688 parent.addMethod(method); 689 } 690 691 694 public void addChild(Callback parent, Method method, 695 UnmarshallingContext navigator, String namespaceURI, String localName) 696 { 697 parent.addMethod(method); 698 } 699 700 703 public void addChild(AssemblyDescriptor parent, 704 ContainerTransaction transaction, UnmarshallingContext navigator, 705 String namespaceURI, String localName) 706 { 707 parent.addContainerTransaction(transaction); 708 } 709 710 713 public void addChild(ContainerTransaction parent, Method method, 714 UnmarshallingContext navigator, String namespaceURI, String localName) 715 { 716 parent.setMethod(method); 717 } 718 719 722 public void addChild(MessageDrivenBean parent, MessageDrivenDestination destination, 723 UnmarshallingContext navigator, String namespaceURI, String localName) 724 { 725 parent.setMessageDrivenDestination(destination); 726 } 727 728 731 public void setValue(EjbJarDD dd, UnmarshallingContext navigator, 732 String namespaceURI, String localName, String value) 733 { 734 if (localName.equals("display-name")) 735 { 736 dd.setDisplayName(value); 737 } 738 } 739 740 743 private boolean isEjbParentName(EnterpriseBean ejb, String localName, 744 String value) 745 { 746 if (localName.equals("ejb-name")) 747 { 748 ejb.setEjbName(value); 749 return true; 750 } else if (localName.equals("home")) 751 { 752 ejb.setHome(value); 753 return true; 754 } else if (localName.equals("remote")) 755 { 756 ejb.setRemote(value); 757 return true; 758 } else if (localName.equals("local-home")) 759 { 760 ejb.setLocalHome(value); 761 return true; 762 } else if (localName.equals("local")) 763 { 764 ejb.setLocal(value); 765 return true; 766 } else if (localName.equals("ejb-class")) 767 { 768 ejb.setEjbClass(value); 769 return true; 770 } else if (localName.equals("callback-listener")) 771 { 772 ejb.addCallbackListener(value); 773 return true; 774 } else if (localName.equals("interceptor")) 775 { 776 ejb.addInterceptor(value); 777 return true; 778 } else if (localName.equals("interceptors")) 779 { 780 StringTokenizer tokenizer = new StringTokenizer (value,","); 781 while (tokenizer.hasMoreTokens()) 782 { 783 String interceptor = tokenizer.nextToken(); 784 ejb.addInterceptor(interceptor); 785 } 786 return true; 787 } 788 789 return false; 790 } 791 792 795 public void setValue(MessageDrivenBean ejb, 796 UnmarshallingContext navigator, String namespaceURI, String localName, 797 String value) 798 { 799 800 if (!isEjbParentName(ejb, localName, value)) 801 { 802 if (localName.equals("acknowledge-mode")) 803 { 804 ejb.setAcknowledgeMode(value); 805 } else if (localName.equals("transaction-type")) 806 { 807 ejb.setTransactionType(value); 808 } 809 } 810 } 811 812 815 public void setValue(MessageDrivenDestination destination, 816 UnmarshallingContext navigator, String namespaceURI, String localName, 817 String value) 818 { 819 if (localName.equals("destination-type")) 820 { 821 destination.setDestinationType(value); 822 } else if (localName.equals("subscription-durability")) 823 { 824 destination.setSubscriptionDurability(value); 825 } 826 } 827 828 831 public void setValue(SessionEnterpriseBean ejb, 832 UnmarshallingContext navigator, String namespaceURI, String localName, 833 String value) 834 { 835 836 if (!isEjbParentName(ejb, localName, value)) 837 { 838 if (localName.equals("session-type")) 839 { 840 ejb.setSessionType(value); 841 } else if (localName.equals("transaction-type")) 842 { 843 ejb.setTransactionType(value); 844 } 845 } 846 } 847 848 851 public void setValue(EntityEnterpriseBean ejb, 852 UnmarshallingContext navigator, String namespaceURI, String localName, 853 String value) 854 { 855 if (!isEjbParentName(ejb, localName, value)) 856 { 857 if (localName.equals("persistence-type")) 858 { 859 ejb.setPersistenceType(value); 860 } 861 } 862 } 863 864 867 public void setValue(SecurityIdentity si, UnmarshallingContext navigator, 868 String namespaceURI, String localName, String value) 869 { 870 if (localName.equals("use-caller-identity")) 871 { 872 si.setUseCallerIdentity(true); 873 } else if (localName.equals("role-name")) 874 { 875 si.setRunAs(value); 876 } 877 } 878 879 882 public void setValue(EjbLocalRef ref, UnmarshallingContext navigator, 883 String namespaceURI, String localName, String value) 884 { 885 if (localName.equals("ejb-ref-name")) 886 { 887 ref.setEjbRefName(value); 888 } else if (localName.equals("ejb-ref-type")) 889 { 890 ref.setEjbRefType(value); 891 } else if (localName.equals("local-home")) 892 { 893 ref.setLocalHome(value); 894 } else if (localName.equals("local")) 895 { 896 ref.setLocal(value); 897 } else if (localName.equals("ejb-link")) 898 { 899 ref.setEjbLink(value); 900 } else if (localName.equals("injection-target")) 901 { 902 ref.setInjectionTarget(value); 903 } 904 } 905 906 909 public void setValue(EjbRef ref, UnmarshallingContext navigator, 910 String namespaceURI, String localName, String value) 911 { 912 if (localName.equals("ejb-ref-name")) 913 { 914 ref.setEjbRefName(value); 915 } else if (localName.equals("ejb-ref-type")) 916 { 917 ref.setEjbRefType(value); 918 } else if (localName.equals("local-home")) 919 { 920 ref.setLocalHome(value); 921 } else if (localName.equals("local")) 922 { 923 ref.setLocal(value); 924 } else if (localName.equals("remote")) 925 { 926 ref.setRemote(value); 927 } else if (localName.equals("ejb-link")) 928 { 929 ref.setEjbLink(value); 930 } else if (localName.equals("injection-target")) 931 { 932 ref.setInjectionTarget(value); 933 } 934 } 935 936 939 public void setValue(MessageDestinationRef ref, UnmarshallingContext navigator, 940 String namespaceURI, String localName, String value) 941 { 942 if (localName.equals("description")) 943 { 944 ref.setDescription(value); 945 } else if (localName.equals("message-destination-ref-name")) 946 { 947 ref.setMessageDestinationRefName(value); 948 } else if (localName.equals("message-destination-type")) 949 { 950 ref.setMessageDestinationType(value); 951 } else if (localName.equals("message-destination-usage")) 952 { 953 ref.setMessageDestinationUsage(value); 954 } else if (localName.equals("message-destination-link")) 955 { 956 ref.setMessageDestinationLink(value); 957 } else if (localName.equals("injection-target")) 958 { 959 ref.setInjectionTarget(value); 960 } 961 } 962 963 966 public void setValue(EnvEntry entry, UnmarshallingContext navigator, 967 String namespaceURI, String localName, String value) 968 { 969 if (localName.equals("description")) 970 { 971 entry.setDescription(value); 972 } else if (localName.equals("env-entry-name")) 973 { 974 entry.setEnvEntryName(value); 975 } else if (localName.equals("env-entry-type")) 976 { 977 entry.setEnvEntryType(value); 978 } else if (localName.equals("env-entry-value")) 979 { 980 entry.setEnvEntryValue(value); 981 } else if (localName.equals("injection-target")) 982 { 983 entry.setInjectionTarget(value); 984 } 985 } 986 987 990 public void setValue(ResourceRef ref, UnmarshallingContext navigator, 991 String namespaceURI, String localName, String value) 992 { 993 if (localName.equals("res-ref-name")) 994 { 995 ref.setResRefName(value); 996 } else if (localName.equals("res-type")) 997 { 998 ref.setResType(value); 999 } else if (localName.equals("res-auth")) 1000 { 1001 ref.setResAuth(value); 1002 } else if (localName.equals("res-sharing-scope")) 1003 { 1004 ref.setResSharingScope(value); 1005 } else if (localName.equals("injection-target")) 1006 { 1007 ref.setInjectionTarget(value); 1008 } 1009 } 1010 1011 1014 public void setValue(EjbRelation relation, UnmarshallingContext navigator, 1015 String namespaceURI, String localName, String value) 1016 { 1017 if (localName.equals("ejb-relation-name")) 1018 { 1019 relation.setEjbRelationName(value); 1020 } 1021 } 1022 1023 1026 public void setValue(EjbRelationshipRole role, 1027 UnmarshallingContext navigator, String namespaceURI, String localName, 1028 String value) 1029 { 1030 if (localName.equals("ejb-relationship-role-name")) 1031 { 1032 role.setEjbRelationshipRoleName(value); 1033 } else if (localName.equals("multiplicity")) 1034 { 1035 role.setMultiplicity(value); 1036 } 1037 } 1038 1039 1042 public void setValue(RelationshipRoleSource source, 1043 UnmarshallingContext navigator, String namespaceURI, String localName, 1044 String value) 1045 { 1046 if (localName.equals("ejb-name")) 1047 { 1048 source.setEjbName(value); 1049 } 1050 } 1051 1052 1055 public void setValue(CmrField field, UnmarshallingContext navigator, 1056 String namespaceURI, String localName, String value) 1057 { 1058 if (localName.equals("cmr-field-name")) 1059 { 1060 field.setCmrFieldName(value); 1061 } else if (localName.equals("cmr-field-type")) 1062 { 1063 field.setCmrFieldType(value); 1064 } 1065 } 1066 1067 1070 public void setValue(SecurityRole role, UnmarshallingContext navigator, 1071 String namespaceURI, String localName, String value) 1072 { 1073 if (localName.equals("role-name")) 1074 { 1075 role.setRoleName(value); 1076 } 1077 } 1078 1079 1082 public void setValue(MethodPermission permission, 1083 UnmarshallingContext navigator, String namespaceURI, String localName, 1084 String value) 1085 { 1086 if (localName.equals("role-name")) 1087 { 1088 permission.addRoleName(value); 1089 } else if (localName.equals("unchecked")) 1090 { 1091 permission.setUnchecked(true); 1092 } 1093 } 1094 1095 1098 public void setValue(ContainerTransaction transaction, 1099 UnmarshallingContext navigator, String namespaceURI, String localName, 1100 String value) 1101 { 1102 if (localName.equals("trans-attribute")) 1103 { 1104 transaction.setTransAttribute(value); 1105 } 1106 } 1107 1108 1111 public void setValue(Method method, UnmarshallingContext navigator, 1112 String namespaceURI, String localName, String value) 1113 { 1114 if (localName.equals("ejb-name")) 1115 { 1116 method.setEjbName(value); 1117 } else if (localName.equals("method-name")) 1118 { 1119 method.setMethodName(value); 1120 } else if (localName.equals("method-param")) 1121 { 1122 method.addMethodParam(value); 1123 } 1124 } 1125 1126 1129 public void setValue(Inject inject, UnmarshallingContext navigator, 1130 String namespaceURI, String localName, String value) 1131 { 1132 if (localName.equals("jndi-name")) 1133 { 1134 inject.setJndiName(value); 1135 } 1136 } 1137 1138 1141 public void setValue(Callback callback, UnmarshallingContext navigator, 1142 String namespaceURI, String localName, String value) 1143 { 1144 if (localName.equals("annotation")) 1145 { 1146 callback.setAnnotation(value); 1147 } 1148 } 1149} 1150 | Popular Tags |