[原创]在WLS9中使用J2EE Libraries 和 Optional Packages

J2EE Libraries 和 Optional Packages
概述
     J2EE Shared Libraries是Diablo的一个新特性。可以将一个J2EE模块共享给其他EAR类型的J2EE模块。你不能从非EAR访问J2EE Shared Library。J2EE Shared Library可以是任何类型的J2EE模块,但推荐打包成EAR。此外还有一种J2EE 1.4的标准共享库方式,称为 Optional Packages。区别在于 Optional Packages是基于标准的,而且不被当作J2EE模块使用。 Optional Packages提供和J2EE Libraries类似的方式将一个JAR文件被多个应用分享。optional packages必须通过部署对应的JAR文件方式先被注册到WLS。注册好后可以部署J2EE模块,通过manifest files来引用这些包。Optional packages和J2EE libraries的区别在于optional packages可以被任何J2EE模块(EAR, JAR, WAR, or RAR 文档)或扩展的目录结构引用。而J2EE libraries只能被EAR引用。
     本文附件exercise包括J2EE Libraries 和 Optional Packages的练习代码,可解压到任意位置。配置一个WLS Domain,记得用户名和密码要都设为weblogic,端口为7001。启动该Domain,并启动相应的Console。使用Domain/bin/setDomainEnv.cmd打开一个Prompt窗口。并把目录切换到你解压的文件的位置。然后就可以按照第五节和六节所述完成练习。如果想快速看一下练习结果,在solution中有已经配置好的两个练习的代码,部署后就可以测试。
一。将一个应用作为J2EE Libraries或Optional Packages。
     你可以在该应用的META-INF目录下创建一个MANIFEST.MF文件,指定自己的版本。
     Extension-Name:可选。表示该库或包的名字。主调应用调用这个应用时需要匹配这个值。如果你不设置这个值,系统将自动使用部署名。
     Specification-Version:可选。定义这个库或包的规格版本。主调应用可以为共享模块随便指定一个规格版本。如果这个规格版本不可用,则主调应用不能被部署。规格参数可以有两种格式。第一种使用主从版本格式,大小版本号用点分割,如"9.0.1.1"。第二种使用文本格式,如 "9011Beta"。如果使用主从版本号格式,主调应用可以配置为共享的模块吻合一个特定版本,或者一个最小版本,或者一个最新的版本额。如果使用文本格式,主调应用必须和共享模块的版本号严格吻合。
     Implementation-Version:可选。定义这个库或包代码的执行版本号。必须在已经定义了规格版本的情况下才能定义执行版本。执行版本使用和规格版本相同的格式。
     如果你不使用MANIFEST.MF文件或者有些条目没有指定,可以在命令行中通过weblogic.Deploy进行部署的时候由参数来设置。
二。J2EE Libraries and Optional Packages比较:
     Optional packages和J2EE Libraries有如下共同点:
     1。在部署的时候都注册到WLS上。
     2。都支持可选执行版本和特定版本字符串。
     3。引用J2EE libraries and optional packages的应用可以指定共享文件的版本。
     Optional packages和J2EE Libraries有如下区别:
     1。Optional package是普通的JAR文件,而 J2EE libraries可以是普通JAR文件,或J2EE应用,或独立的J2EE模块。J2EE libraries可以包括有效地J2EE或WLS部署描述符,而optional package JAR中的任何部署描述符都被忽略了。
     2。任何J2EE应用或模块可以通过META-INF/MANIFEST.MF引用 optional package。而只有企业应用可以通过weblogic-application.xml引用J2EE library 。
     3。Optional packages可以引用其他Optional packages,而J2EE libraries不能引用其他J2EE libraries。
三。最佳实践:
     1。如果需要共享J2EE模块给多个企业应用。使用J2EE Libraries。
     2。如果要部署独立的J2EE模块作为共享库,应该把模块打包到企业应用中。这样可以防止潜在的URI冲突。因为独立模块库的URI来源于不署名。所以在部署时指定一个部署名,当其他应用引用它时作为URI。
     3。如果多个J2EE压缩文件需要共享一些JAVA类,则应该用optional packages。
     4。如果有一些类在本Domain中需要被其他应用调用,而你又不经常省级这些类(比如第三方类),则最好把它们放在Domain的 /lib目录下,而不是使用J2EE libraries或optional packages机制。在/lib子目录下的类会在Server启动时候自动装载到系统环境变量中。
     5。通常指定一个规范版本和一个执行版本。即使你不打算使用版本需要功能。为库指定版本可以在做测试时为共享的文件部署多个版本。
     6。通常为每个库指定一个扩展名,如果你不指定扩展名那系统会自动使用库的部署名作为扩展名。
     7。当开发了一个Web应用要部署成J2EE应用,应该使用唯一的上下文目录。如果它的上下文目录和他依赖的应用的上下文目录冲突,应该使用EAR的weblogic-application.xml中context-root元素来覆盖库的上下文目录。
四。组装共享的J2EE Library 文件:
     几乎所有独立的J2EE模块或EA可以被部署成shareable J2EE library,但有如下限制:
     1。不能在一个J2EE library中引用另一个J2EE library.
     2。共享库不能嵌套。如果你不属一个EAR作为共享库,那整个这个EAR必须被作为一个库,而不能指定这个EAR中的某个独立J2EE模块为一个独立的库。
     3。像其他J2EE模块和企业应用一样,J2EE library必须被部署到目标Server或Cluster上去。这意味着库需要一个有效的J2EE部署描述符和WLS指定的部署描述符。
     4。推荐把J2EE libraries打包成企业应用,而不是独立的J2EE模块。因为独立模块的URI来自于部署名。默认WLS使用部署压缩文件的文件名或展开的目录名作为部署名。
     5。如果你选择把库部署成独立的J2EE模块,通常应该指定一个部署名并把这个名字作为被应用引用的URI。
五。练习开发和部署Shared J2EE Library
     本练习在J2EEShared目录下。可以看到有两个目录,其中SharedLibraryEAR是被调用的shareable J2EE library,CallingLibraryEAR是调用该库的企业应用。通过把SharedLibraryEAR配置成共享库,CallingLibraryEAR可以访问LoanEJB就像打包在自己的EAR中。
     1.我们先来开发一个库应用。观察一下SharedLibraryEAR下面的目录结构和文件。
     目录LoanEJB是一个EJB结构。包括一个空的目录META-INF和一个包含一个JAVA文件Simple.java的目录data。LoanEJB\data目录是放EJB的源代码,Simple.java是我手写的。在LoanEJB下执行java com.bea.wls.ejbgen.EJBGen -descriptorDir META-INF data\Simple.java就会在生成SimpleHome.java,SimpleRemote.java,ejb-jar.xml,weblogic-ejb-jar.xml和ejbgen-build.xml。然后到LoanEJB编译这几个CLASS:javac data\*.java,生成根和桩文件。最后执行jar cvf ..\LoanEJB.jar *,打包我们需要的EJB LoanEJB.jar到SharedLibraryEAR目录。
     目录APP-INF是一个空的目录,可以放入当前这个应用需要的第三方包。
     目录META-INF下包括application.xml和weblogic-application.xml。application.xml指定了这个应用所包含的只有一个EAR模块:LoanEJB.jar,以及这个应用的部署名。为了把这个应用做成共享库,现在我们创建一个MANIFEST.MF文件,并在里面写入如下信息:
          Extension-Name: myLib
          Specification-Version: 1.0
          Implementation-Version: 1.0
     然后在J2EEShared下执行java weblogic.appc SharedLibraryEAR,生成可部署的企业应用。
     2.配置 CallingLibraryEAR来引用SharedLibraryEAR模块。观察一下CallingLibraryEAR下面的目录结构和文件。
     目录APP-INF是放EAR内部公用的类和库的目录。在这个练习中不需要使用。
     目录LoanApproval是一个Web应用。index.jsp用于调用EJB LoanEJB的getString方法,而没有指定这个EJB是来自本企业应用还是其他库。如果调用成功,则把在LoanEJB中设置的一个字符串显示在浏览器上。
     目录META-INF中包括application.xml和weblogic-application.xml。application.xml指定了这个应用所包含的只有一个Web模块LoanApproval。在weblogic-application.xml中除了编码方式,我们还要指定使用的共享库的名称。能看到在library-ref中我们指向了SharedLibraryEAR这个库myLib。同时在这个文件中我们还能指定库的规格版本和执行版本,以及是否需要严格匹配等。
     在J2EEShared目录下执行 java weblogic.appc -library SharedLibraryEAR CallingLibraryEAR来预编译JSP。执行后会看到在LoanApproval\WEB-INF\classes下面会生成一个目录jsp_servlet包含JSP被编译成的Servlet__index.class和__error.class。由于在weblogic-application.xml中指定了使用的共享库,所以appc在调用jspc来编译JSP的时候能找到调用的EJB LoanEJB的命名空间以及对应类。
     3。部署共享库和前端企业应用并测试。
     确保你的Server运行的情况下,在J2EEShared下执行下面两个命令来部署SharedLibraryEAR和CallingLibraryEAR。注意执行以前Console不能使被Look状态的。
          java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password weblogic -deploy -library SharedLibraryEAR
     执行之后在Console的Deployments部分能看到新添加了一个名为myLib(1.0)的库,状态为Installed。
          java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password weblogic -deploy CallingLibraryEAR
     执行之后在Console的Deployments部分能看到新添加了一个名为CallingLibraryEAR的应用,状态为Active。
     如果部署成功,在Console和Prompt都不会有报错。打开一个浏览器测试一下:http://localhost:7001/LoanApproval。如果一切正常,会显示在EJB中设置的那行字符串。
     注意,当需要卸载库的时候,必须先卸载引用这个包的所有应用,然后Activate Change,然后再Look,并且卸载库。
六。练习开发和部署optional packages
     本练习在OptionalPackages目录下。可以看到两个目录,其中SimpappOptionalPackage是被调用的Optional Packages,SimpappEAR是调用该包的企业应用。通过把SimpappEAR配制成共享包,SimpappOptionalPackage可以访问Simpapp类就像打包在自己的EAR中。
     1。我们先来开发一个Optional Packages。观察一下SimpappOptionalPackage下面的目录结构和文件。
     目录META-INF中现在是空的。需要创建一个MANIFEST.MF文件,包括如下内容:
          Extension-Name: myOptionalPackage
          Specification-Version: 0.9
          Implementation-Version: 1
     目录simp下面包含一个源代码文件Simpapp.java。在OptionalPackages\SimpappOptionalPackage\下执行javac simp/Simple.java,会在simp目录下编译出Simple.class。然后执行 jar cvfm simpapp.jar META-INF/MANIFEST.MF *,把这个类打成一个名为simpapp.jar的JAR包。
     2。配置SimpappEAR来引用SimpappOptionalPackage模块。观察一下SimpappEAR下面的目录结构和文件。
     目录APP-INF和我们前面说的一样,就不赘述。
     目录META-INF下包括application.xml和weblogic-application.xml。application.xml指定了这个应用所包含的只有一个Web模块SimpappWebAp。为了把这个应用做成Optional Packages,现在我们创建一个MANIFEST.MF文件,并在里面写入如下信息:
          Extension-List: simpapp
          simpapp-Extension-Name: myOptionalPackage
          simpapp-Extension-Specification-Version: 0.9
     然后在OptionalPackages下执行java weblogic.appc -classpath SimpappOptionalPackage/simpapp.jar SimpappEAR, 生成可部署的企业应用。注意这次我们没在appc中使用-library,因为使用 optional packages的时候不需要获得它的部署描述符。但我们需要指定optional packages模块的位置放到classpath里编译JSP。
     3。部署OptionalPackages和前端企业应用并测试。
     确保你的Server运行的情况下,在OptionalPackages下执行下面两个命令来部署SimpappOptionalPackage和SimpappEAR。注意执行以前Console不能使被Look状态的。
          java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password weblogic -deploy -library SimpappOptionalPackage\simpapp.jar
          java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password weblogic -deploy SimpappEAR
     如果部署成功,在Console和Prompt都不会有报错。打开一个浏览器测试一下:http://localhost:7001/SimpappWebApp/。如果一切正常,会显示在Simple.java中设置的那行字符串。
七。相关资源。
     http://e-docs.bea.com/wls/docs90/notes/new.html
该帖由 goblinize 在 Nov 4, 2005 5:43 PM 编辑过

另外谢谢支持征文活动,让大家先看一下,然后再考虑奖励的事情。希望大家积极参与。
有什么问题在此积极留言,希望作者给以解答。

Similar Messages

  • Referencing an optional package in a jar inside an ear

    UPDATE: We no longer need this as the third-party will change their shared-library ear to a jar for use on other application servers.
    We have no trouble deploying an ear containing a jar as a shared library, and then referencing the classes in it from another application by specifying the appropriate <library-ref> in weblogic-application.xml.
    In some installations, that shared library is not required, and indeed may not be present. In that case, the <library-ref> is unresolved, and the application will not deploy. We would like to avoid having two versions of our application - one with the <library-ref> and one without.
    If we add the Extension-Name property to the manifest of the jar mentioned above, and deploy the jar (not the ear) as a shared library, our application can reference classes in that jar. The problem is that the library ear (containing the jar) comes from a third party, and we cannot extract out the jar. And the "optional package" mechanism does not appear to work for jars within ears. We've specified the Extension-Name from the library ear ( the one from the library jar is not visible) in the Extension-List of the application. There is no complaint that the optional package is unresolved, but accessing the classes gives ClassNotFoundException.
    I did not find any documentation that optional package jars within an ear should be visible to other deployment units, but it seems odd that the third party would package them such that they can only be referenced with the <library-ref> (i.e. on WLS).
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/libraries.html
    http://java.sun.com/j2ee/verified/packaging.html
    Edited by: mikereiche on Nov 11, 2011 4:34 PM

    The JarInputStream class is used to read the contents of a JAR file from any input stream.
    InputStream input=getResourceAsStream("/input.xml");
    JarInputStream jis
    =new JarInputStream(input);

  • Restart deployment (.ear) does not load optional package

    Hello everybody,
    In our 10.3.5 WLS domains, we are using optional packages for sharing libraries between applications see [http://docs.oracle.com/cd/E24329_01/web.1211/e24368/libraries.htm|Creating Shared Java EE Libraries and Optional Packages]
    The problem is that if I redeploy the library I have to redeploy the deployment. This issue only happens with the applications packaged as *.ear*. If the application has been deployed as a .war, with restarting the deployment is enough.
    Would be possible to load the referenced library from an *.ear* just restarting the deployment?
    Thanks in advance,
    Luis

    Thanks Vimala,
    I have 1 ear project and 1 web service project.
    Attached my ant output when I run the build.xml.
    C:\wivWorkSpace\wivApp>ant build -Dworkspace=C:/wivWorkSpace
    Buildfile: build.xml
    init.env:
    init.typedefs:
    init:
    build:
    [echo] project.name = wivApp
    init:
    build:
    [echo] wivWS: C:\wivWorkSpace\wivWS\build.xml
    BUILD SUCCESSFUL
    Total time: 23 seconds
    C:\wivWorkSpace\wivApp>ant build -Dworkspace=C:/wivWorkSpace archive
    Buildfile: build.xml
    init.env:
    init.typedefs:
    init:
    build:
    [echo] project.name = wivApp
    init:
    build:
    [echo] wivWS: C:\wivWorkSpace\wivWS\build.xml
    init.env:
    init.typedefs:
    init:
    stage:
    [delete] Deleting directory C:\wivWorkSpace\wivApp\.staging
    [mkdir] Created dir: C:\wivWorkSpace\wivApp\.staging
    [copy] Copying 13 files to C:\wivWorkSpace\wivApp\.staging
    BUILD FAILED
    C:\wivWorkSpace\wivApp\build.xml:192: The following error occurred while executing this line:
    jar:file:/C:/BEAPLA%7e1/WEBLOG%7e1/workshop/lib/wlw-antlib.jar!/com/bea/wlw/antlib/antlib.xml:91: The follow
    ng this line:
    C:\wivWorkSpace\wivApp\build.xml:204: The following error occurred while executing this line:
    Target `stage.to.ear' does not exist in this project.
    Total time: 15 seconds

  • Optional Package - does it decrease memory size for war

    We have around 10+ war files running within WLS 10.3.4.
    Each of the war files are around 40 megs each.
    I am looking at building a frameworks jar (via Apache Shade) and make that jar an optional package (which includes all my 3rd party frameworks like Spring/CXF/etc).
    By deploying this jar as an optional package, I can cut the size of the war file in half.
    The question is, does this really save the size of the war in memory?
    When I deploy a war with a reference to an optional package, does WLS explode the war, import the optional package, and rebuild the war for deployment so that in the end, it equates to the same size war as if I had never utilized the optional package? The documentation seems to allude to this.
    I want to know (before I do all the work), if decreasing the size of the war by excluding 3rd party libraries into an optional package will actually reduce the size of memory for each war.
    Thanks,
    Jay

    One option is: use the c6/c7/c8 parameters if the INSTALL APDU. Start with a high value and work your way down. That will tell you how much mem you have.
    The other option is to load an applet that allocates a large byte array. Work your way down and when it can successfuly allocate the memory, that's whats available on the card for you to use.
    Third option: Get a 2.2 card and just call the API ! ! !

  • Weblogic Optional Packages - Permgen Memory Space

    Hi,
    We are packaging some common jars as Optional Packages in weblogic and using them from different EAR files.We know for classes in side the EAR, each classloader creates individual clazz objects in the permgen space.
    For classes inside the Optional packages and which are referenced in multiple EAR,does weblogic create seperate clazz instances in the permgen space for each classloader? If so then it would mean that classes inside the Optional Package will be created multiple times in the permgen space (attributed to different classloaders)
    Any idea on the behaviour will be highly appreciated.Is the situation same with shared libraries ?

    Depends on where your optinal classes are located.
    If you insert them in the system (or server) classloader they will be loaded once, by the system
    classloader. You can use the ${DOMAIN_HOME}/lib directory for this purpose. The jars located in
    this directory will be picked up and added to the end of the server classpath at server startup.
    The jars will be ordered lexically in the classpath.
    If you are using shared libraries, these shared libraries will be merged at runtime with the
    applications referencing them, so they will be local to the application and to my knowledge
    loaded by the classloader of the application and not a separate shared library classloader. Thus
    if you reference the shared library from multiple applications, the shared libraries get merged
    multiple times and loaded multiple times. The reason is that WebLogic uses classloading
    isolation between the deployed applications, so that from a classloading perspective
    other applications do not bother other applications.

  • Weblogic optional package deployment issue

    Hi All,
    I am using WLS 10.3.4. I have an J2EE web application which references a JAR library as an optional package. Here is my definition of JAR file in the library MANIFEST.MF,
    Manifest-Version: 1.0
    Extension-Name: PCGCommon2.0
    Specification-Version: 1.0.0.0
    Implementation-Version: common055jkp
    Here is my definition of JAR file reference in the application MANIFEST.MF,
    Manifest-Version: 1.0
    Extension-List: pcgcommon2
    pcgcommon2-Extension-Name: PCGCommon2.0
    pcgcommon2-Specification-Version: 1.0.0.0
    pcgcommon2-Implementation-Version: common055jkp
    I deployed the JAR library first successfully. Then I tried to deploy the application. It throws me this error as follows,
    +[J2EE:160149]Error while processing library references. Unresolved Optional Package references (in META-INF/MANIFEST.MF): [Extension-Name: PCGCommon2.0, Specification-Version: 1, Implementation-Version: common055jkp , referenced from: /opt/oracle/Oracle/Middleware/user_projects/domains/Pinellas1qDomain/servers/Pinellas1qMS3/tmp/_WL_user/ppa/cwbd0p/war].+
    Can anyone have an idea what I am missing here?
    Thanks in advance,
    -John
    Edited by: john wang on Mar 9, 2011 8:44 AM
    Edited by: john wang on Mar 9, 2011 8:58 AM

    Hi John,
    Please find the working TestCase in the following Location:
    http://middlewaremagic.com/weblogic/?p=231#comment-3144
    I am copying and pasting the README.txt file here which i attached in the TestCase:
    README.txt
    Step1). Make Sure that the Hello.java is compiled properly like following:
    javac -d . Hello.java<font color=red>Actual Trick is Making the JAR using 'M' option..... :) </font><br>
    Step2). The Most important step to Make the "HelloWorld.jar" along with the MANIFEST.MF file which is present inside "HelloWorld\META-INF\MANIFEST.MF"
    Use the below command with *'M'* as a Flag while making JAR file so that the Jar utility will not overrite the MANIFEST.MF on it's own rather it will place our own MANIFEST.MF inside the Jar.
    C:\OptionalPackageDemo\HelloWorld\> jar -cvfM  HelloWorld.jar META-INF\MANIFEST.MF Hello.java com
    Step3). Deploy the HelloWorld.jar and the TestWebApp
    <b><font color=red>NOTE: </font></b> I just now tested the attached TestCase in WLS10.3.0 And it perfectly worked for me. So if it's not working for you in WLS10.3.4 then i would request you to please open a Support Ticket with Oracle WebLogic Support Team because ideally the same test case is supposed to work fine in that version as well.
    Thanks
    Jay SenSharma

  • Optional package versus shared library

    I quote from the WL docs...
    "Optional packages differ from Java EE libraries because optional packages can be referenced from any Java EE module (EAR, JAR, WAR, or RAR archive) or exploded archive directory. Java EE libraries can be referenced only from a valid Enterprise Application. "
    Does this mean that javaee libraries can be accessed only from EAR and WAR
    whereas optionalpackage can be accessed from ear,jar , war or rar.....
    in otherwords javaee libraries cannot be accessed from a regular jar or rar...
    if that is the case, I wish they had just said so!

    Hi,
    EAR Shared Library Cannot be referenced by A WAR Application...EAR Shared Library Should be referenced By An EAR Application Only.
    Similarly...a WAR Shared Library cannot be referenced by EAR....So rule:
    EAR Shared library--------should be reffered by EAR Applications
    WAR Shared Libraries ---should be reffered by WAR Applications
    I have developed a Simple TestCase to demonstrate it...Please download it from: http://www.4shared.com/file/219660365/de4e3636/SharedLibrary_TestCase.html
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com/generalweblogic/ (WebLogic Wonders Are Here)

  • Generic Connection Framework Optional Package for J2SE

    i have learnt that the Generic Connection Framework Optional Package can be used to make J2SE able to use J2ME classes. However, how can i implement the package so that i can do so.
    Thank you for your advice.

    http://developers.sun.com/techtopics/mobility/midp/articles/genericframework/

  • Optional Package - startup behavior

    Hi guys,
    Hi have an optional package (similar to a shared library) that is referenced by two different applications. This optional package is a jar file.
    When I 've a web application (WAR) I know that WebLogic will use the exploded directory in .../tmp/_WL_user to load the application, but which is the behavior when i'm using a jar file?
    Thanks

    Hi Amol,
    WebLogic jDriver for Oracle fully supports the JDBC 2.0 Optional Package API for
    distributed transactions.
    Laurent Goldsztejn
    Developer Relations Engineer
    BEA Support
    "amol desai" <[email protected]> wrote:
    >
    Do you support the optional package features? If yes , how?

  • Optional package

    How can I add optional package (example the MMAPI) for a phone that does not implement it natively?
    is it possible?
    Example we have a P900 that does not support MMAPI for video... is it possible to extend its possibilities?
    Many thanks
    Greg

    (oops, error in previous post... wrong tag...)
    Hi Greg,
    In theory this would be possible, yes... However, this might be a lot of work because you will have to develop it in Java (as you cannot use a native language like C, there's no public native interface). This means that you will need to write things like playing back a video (from a stream), etc etc... All in Java; with its limitations. Sound playback (probably?) can be covered by the MMAPI (so you might need to extend a few pieces from MMAPI and use that within your Java Video MMAPI).
    Cheers

  • Optional package feature supported

    Do you support the optional package features? If yes , how?

    Hi Amol,
    WebLogic jDriver for Oracle fully supports the JDBC 2.0 Optional Package API for
    distributed transactions.
    Laurent Goldsztejn
    Developer Relations Engineer
    BEA Support
    "amol desai" <[email protected]> wrote:
    >
    Do you support the optional package features? If yes , how?

  • Use of Optional Packages

    Hello,
    I would like to know if there is any way to include in my application an optional package just in case the device does not have it in its Runtime Environment.
    What I was thinking is more like including all the classes from a jar file (e.g j2me-ws.jar JSR172) in my application's jar file.
    Thanks in advance,
    Nick

    Hi there,
    The reason it did not work is because it failed to decode doubles. But once I replaced the doubles in my WS with Strings everything went smoothly.
    Note: I was using CLDC1.1 so doubles should have been supported(The WTK emulators worked just fine, but the Nokia and Sony Ericsson emulators didn't).
    SO for everybody out there: try not to use doubles in your WS for the moment :) (WTK 2.2)
    Cheers, Nick

  • Confusion with JDBC Optional Package for CDC.

    I am somewhat confused as to where this optional package fits.
    1. Is the implementation of this optional package to be COMPLETELY supplied by the database vendor(e.g. hsqdb, Oracle)?
    OR
    2. Is there an implementation available from Sun?
    OR
    3. Has Sun simply not released an implementation yet?
    OR
    4. Am I completely missing something here and losing my mind :)
    OR
    Is the JVM supposed to supply the implementation?
    Thanks for any enlightenment.
    J

    The actual specification can be written without actually talking to a database (the spec is mostly interfaces). However, you are write in that along with these classes (which must pass the TCK) the database vendor must provide the rest. Unlike normal java.sql where there is a DriverManager class, that is not the case in JSR-169.

  • Optional Package class reference at server startup...gives class not found

    I have a enterprise app having a webservice..the webservice (servlet) gets instantiated on server startup…It has reference of a class which is an optional package
    All the manifest entries are correctly added to the ear..manifest.mf..
    When the servlet is initialized at startup.. gives me a class not found error…
    However, the app works fine..this is just a one time error(whenever the app is deployed fresh..)..
    Any help would be appreciated
    Thanks

    I have a enterprise app having a webservice..the webservice (servlet) gets instantiated on server startup…It has reference of a class which is an optional package
    All the manifest entries are correctly added to the ear..manifest.mf..
    When the servlet is initialized at startup.. gives me a class not found error…
    However, the app works fine..this is just a one time error(whenever the app is deployed fresh..)..
    Any help would be appreciated
    Thanks

  • Is it possible to redeploy Optional Package(J2EELibrary)without versioning?

    Currently, I decided to use Optional Package feature for one of our common shared jar file as it is referenced by our multiple applications (ear files). I can understand, how I can deploy multiple version of the optional package in order for the referencing application to use it. I am planning to use this version feature for optional package in our Production Environment. However, my issue is I don't want to use this version feature in our development environment as it involves more work for the developers (overhead on the developers to specify the optional package version in their referencing application). Is there any way I can redeploy optional package in development environment? I can only redeploy only after undeploying all my 6 referencing applications, which is taking more time.

    Does any one have an example to implement Optional Package and versioning it?

Maybe you are looking for