Proposal for Java Frameworks

I've come up with a neat way of extending java's packages and inner classes to create the conceptual level of a "framework".
The technology changes are small, but the conceptual shift is huge.
A framework is a collection of classes that are linked together more closely than those in a package. Most importantly, frameworks can inherit from each other, in interesting dynamic ways.
Several languages, like Objective-C (which is more Java-like than C++ in all but syntax), allow in various ways for programmers to meddle in the hierarchy of other classes, in a way that in Java just isn't possible. The libraries from Omni use "categories" to seriously meddle with Mac OS X's Cocoa frameworks, and this is often cited as a strength of Cocoa programming. But with just two small changes, Java can leapfrog them all and become the undisputed leader of object technology.
Part 1: Syntactic Sugar
The next version of Java should add the framework keyword, as a synonym for class. So, a file called X.java:
package a.b;
public framework X {
     interface A { ... }
     abstract class B implements A { ... }
     public class C extends B { ... }
     public void main (String[] args) { ... }
     private int aMember;
}You can see, however, that it allows not only inner classes, but inner interfaces and abstract classes. Also, every member of a framework is static. This is important, since it allows the inside of a framework to behave like the inside of a package.
This is reflected in the next change, which the framework keyword makes possible in other files:
package a.b.X;
public class Y { ... }Classes can be added to a framework from other files as if it were a package. This is all just syntactic sugar for inner classes, which the compiler generates as X.class, X$B.class, X$Y.class, etc. This way, people can create frameworks of classes, which feel more coherent than packages. They are accesses from the outside in the standard way.
Part 2: Dynamic Inheritance
This change, however, requires an addition to the class loader. It covers an otherwise rare case that can occur with inner classes, and isn't specific to frameworks, but is required for their advanced behaviour. Luckily, it's more an addition than a change - it shouldn't break any existing code.
Imagine a class with inner classes, and another class that inherits from it and overrides some of them.
class X {
     class A {
          public static void write () {
               System.out.println("ordinary");
     class B {
          public static void write () {
               A.write();
class Y extends X{
     class A {
          public static void write () {
               System.out.println("salt and vinegar");
     public static void write () {
          B.write ();
}So what happens when you call Y.write(); ? At the moment, it looks from Y for a class B, and finds X$B. Then it looks from B for a class A, and finds X$A. So Y.write would produce the output:
ordinaryWhat should happen is that it should generate a new class Y$B. In this case, it would be a duplicate of X$B, but which was able to find Y$A and call its write method - as you'd expect.
The other half of this is to do with inheritance - and this is where purer languages like Objective-C currently have a slight advantage. But not for long, because we're going to create dynamically inherited classes - which is exactly what they can do, but we'll do it without having to introduce any strange new syntax or ideas, slotting it neatly into existing inner classes.
You have a similar situation to above, but with inheritance in the inner classes:
class X {
     class A {
          public static void innerWrite () {
               System.out.println("ordinary");
     class B extends A {
          public static void outerWrite () {
               innerWrite();
class Y extends X {
     class A {
          public static void innerWrite() {
               System.out.println("salt and vinegar");
     public static void write () {
          B.outerWrite();
}So now we have a classes X$A, X$B and Y$A. The write(); method is calling for Y$B - where does it get it from? At present, it just gets X$B. Instead, the VM should create a new class Y$B, that extends Y$A in the same way that X$B extends X$A. Since every method call in Java is already looked up dynamically, it shouldn't be much harder than duplicating X$B and switching its parent. This is really just a correction of how inner classes should work, rather than an exotic new feature.
A lot of you will either have gotten lost by now, or be wondering what the point is. The point is that we can take an existing framework, and add in behaviours at the root of the hierarchy, and then let those behaviours flow down through all the other classes. So we could take the Window class, and add the ability for all kinds of windows to have, say, nice fuzzy shadows. And suddenly every kind of window, from a dialog box to a pallette to a tooltip, will have nice fuzzy shadows.
So, potentially huge rewards, for very little personal coding effort.
Loose ends
The incredibly astute among you will have wondered about one last little point, when you want to extend classes in a framework. The compiler will need one last little patch to handle this syntax point:
framework X {
     class A {
          public int getNumber() {
               return 5;
framework Y extends X {
     class A extends A {
          public int getNumber() {
               return 7;
}Here, the compiler sees class A extends A and needs to read it as saying "look up the existing class A (from X) and create a new class A in Y that extends it".
When Sun created inner classes, they didn't realise what they'd unleashed. Here we take them to their logical conclusion, not by adding exotic special cases, but by filling in the small logical holes in what's already there.
     - the Shrink Laureate

The point is conceptual. Now that most people have
moved from functions to objects (and from pointers to
references) it's time to keep going and move to the
next step onwards.The question is, "Is this really a step forward?"
As has already been pointed out, Java provides interfaces to set up this kind of layout. As also was already pointed out, tying objects closely together this way breaks the OO nature of the design, thus reducing reusability.
So my answer to this question is "No, it's really not a step forward."
> There are always people who resist change. Lots of
people didn't like object-orientation. But how many
serious programs nowadays are written in C and
Pascal?You really don't want to know the answer to that question. An awful lot of batch programs are still written in C. And an even larger number of programs are writtin in VB.
Java has to keep evolving, or it'll get left behind -
which would be a pity, because it really is rather
nice.Yes, Java does need to keep evolving. The problem is that it needs to have its core features stable and bug-free before it can really expand and evolve. The good news is that because it's now several years old, it's far ahead of C# in this regard!
It doesn't. It has references. There's a difference.
referenceVsPointerThread.join();

Similar Messages

  • Licensing Framework for Java

    Hello,
    does anyone know where one can find a freely distributed licensing framework for java applications, or suggest any solution to unblock certain functionalities only for the users provided with a licence? (talking of experimental software that I developed, not minded for commerce at present status) .

    there are some java libraries that are free for non
    commercial use but require to purchase a license for
    commercial applications.yes there is. This is true also of non java software.
    There is also the GPL (GNU public license) which allows you to distribute the code, but only in an open source way.
    My question is : what if some one use this library in
    commercial app without purchasing licence ? how can
    the owner of the librairy control the use of his
    work. and if you use it for commercial purposes what
    will happen ?Then you have a lawsuit. The damaged party may seek compensation and potentially damages from the license violator. The license owner may also seek an injunction

  • Custom thread pool for Java 8 parallel stream

    It seems that it is not possible to specify thread pool for Java 8 parallel stream. If that's so, the whole functionality is useless in most of the situations. The only situation I can safely use it is a small single threaded application written by one person.
    In all other cases, if I can not specify the thread pool, I have to share the default pool with other parts of the application. If someone submits a task that takes a lot of time, my tasks will get stuck. Is that correct or am I overlooking something?
    Imagine that someone submits slow networking operation to the fork-join pool. It's not a good idea, but it's so tempting that it will be happening. In such case, all CPU intensive tasks executed on parallel streams will wait for the networking task to finish. There is nothing you can do to defend your part of the application against such situations. Is that so?

    You are absolutely correct. That isn't the only problem with using the F/J framework as the parallel engine for bulk operations. Have a look http://coopsoft.com/ar/Calamity2Article.html

  • Problems between Xcelsius and WebDynpro for Java

    How should I do to show Xcelsius in WebDynpro for Java?
    How should I transport data between Xcelsius and WebDynpro?
    How should I control WebDynpro with Xcelsius?For example,firing plugs in Xcelsius like in WebDynpro to change one view to another.
    How should I do to execute a Java method in Xcelsius?For example,scheduling a job on clicking a button in Xcelsius.
    Besides these,I also want to know the same problems between other BOE contents and WebDynpro for Java.
    Regards,
    Abe

    Hi Pradeep:
    Well that purely depends on the business application (project) your client is proposing. Following are very few factors which will drive for creating web-based applications:
    VC: it's a UI modeling tool (non-programming) for creating rapid creation of web-based applications.
    WD: its a powered by Java and ABAP with which you can create robust business applications.
    If your client is very choosy about rapid application development, reporting, rich user interface, to reduce TCO then VC is the choice. Or if the project contains typical integration with SAP and non-SAP systems, complex business logic development, integration with WCM systems...etc then WDJ is the option.
    If you’ve some sort of custom development with facilitating the Development Infrastructure (NWDI) then WDJ is the only option I could say.
    We hope with NW CE 7.1.1(referred by Priyanka Singh) tighter integration between these TWO tools may over come the ambiguity of using them.
    Tnx,
    MS

  • What can Webdynpro for java do for CRM 5.0?

    hi  expert.
    What can Webdynpro for java do for CRM 5.0?
    And can I develop PCUI with Web dynpro for java?
    Is it possible?
    Regards bk Kim.

    Srinivas
    A.>
    Basic Question? But can you tell me what do you mean by application framework
    in general?
    B.>
    Also can someone please tell me whats the difference between dynpro and web dyn pro?
    C.>
    Whats the difference between java web dynpro and abap web dynpro
    d.>
    when does one choose to use web dynpro to do the development?what are its
    advantages compared to conventional java development.
    Thanks
    Points will be awarded appropriately

  • Instalation to try webdynpro for java

    Hi Experts,
    I'm trying to perform an instalation to make some tests with webdynpros for java.
    In our office we have a 2003 Server Standard edition, but I don't know if I have to install the programs on the  Server or on a Personal Computer.  I don't know anything about sistem managing or administration
    We have downloaded this tryal versions:
    - SAP NetWeaver 2004 SP16 --> version java+webdynpro
    - SAP NetWeaver 7.0 (2004s) SP9 --> version JavawebdynproComposite Application Framework
    A workmate of mane have tryed to install them but he says that he can't complete the installation c'ause an error is recieved at the middle of the instalation.
    Does anybode please can give me a clue about how do I have to instal it, where; and wich version? The tests i want to make are about creating webdynpro applications with netweaver developer studio.
    Thank-you very much.
    Artur.

    Hi,
    You can get installation guides for every installation you require in service market place.
    Try refering this link
    https://service.sap.com/instguides.
    Hope it helps..
    Regards,
    Srujana.

  • ANN: XML Parser for Java Version 2.0.2.4

    Oracle announces the release of version 2.0.2.4 of the XML
    Parser for Java now available for free download on the Oracle
    Technology Network. This version features an integrated XSLT
    Processor that is compliant with the recently released W3C XSLT
    1.0 Proposed Recommendation.
    This parser includes the following new features from previous
    versions:
    * XSLT Extension Function support is now available
    * XSL Output has been enhanced to provide support for PrintWriter
    and OutputStream for XML Documents and Doc Fragments.
    This is the fourth maintenance release of v2 and includes a
    number of bug fixes. See the included readme.html for details.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

    This is covered by patch for bug 2199206. Thanks

  • Configuration of EWA reports for java systems.

    Hello,
    I am facing a problem with configuration of EWA reports for SAP NW Portal.
    I have already configured EWA for abap systems, and those are running good on weekly basis. but i have problem with configuration of reports for java systems.
    So far, i have installed an SMD agent and CA on my EP-satellite system. I have also configured and SMD server on my Sollution Manager and registered the SMD agent on SMD server and installed Willy Introscope on SMD server.
    I  am using a central SLD which is running on different host as Solution Manager. I did all the configuration (smsy_setup, configuration of sld_data_supplier etc... )
    I have also created the system in SMSY, matched the smsy with SLD and assigned Logical component to java system.
    So far, so good according to manuals but when i  want do define data collection in the SMD for Gargage Collection  (task in scheduler) i cannot see host of my portal system.
    I can see only the hosts (scheduler tasks ) of all abap system for which the EWA reports have already been  generated.
    Am i missing something?
    Some configuration in SMD?
    My solution manager is running on Sap NW 7.0, SPS16,
    Sattelite system  NW 7.0 EP, SPS 6 (planning to SPS 19)
    Thank you for your advices!!!

    Hi Suveer,
    I did the configuration before. I forgot to mention it.
    I found this errors in Diagnostic Setup, maybe this could be the cause of the issue.
    Step BI Details
    Cannot invoke CCMSBISETUP on host localhost
    !! Exception : An exception occured during the execution of this function 'CCMSBI_RUN_SIMPLE_SETUP_IN_BTC'.(cause=com.sap.sup.admin.abap.rfc.exception.RfcExecutionException The function named 'CCMSBI_RUN_SIMPLE_SETUP_IN_BTC' doesn't exist!)
    Exceptions
    com.sap.sup.admin.abap.rfc.exception.RfcExecutionException: An exception occured during the execution of this function 'CCMSBI_RUN_SIMPLE_SETUP_IN_BTC'.
    at com.sap.sup.admin.abap.rfc.function.RfcFunction.execute(RfcFunction.java:92)
    at com.sap.sup.admin.setup.AbapSysRfcAdapter.setupBIConfiguration_ccmsBiSetup(AbapSysRfcAdapter.java:743)
    at com.sap.sup.admin.setup.AbapSysRfcAdapter.setupBIConfiguration_ccmsBiSetup(AbapSysRfcAdapter.java:727)
    at com.sap.sup.admin.setup.ManagingServices.startCcmsBiSetup(ManagingServices.java:2686)
    at com.sap.sup.admin.setup.SetupStep.execute(SetupStep.java:334)
    at com.sap.smd.agent.plugins.remotesetup.SapInstance.setup(SapInstance.java:304)
    at com.sap.sup.admin.setup.wizard.monitoring.ConfirmationView.setupSMDServer(ConfirmationView.java:378)
    at com.sap.sup.admin.setup.wizard.monitoring.ConfirmationView.onActionSetupServer(ConfirmationView.java:211)
    at com.sap.sup.admin.setup.wizard.monitoring.wdp.InternalConfirmationView.wdInvokeEventHandler(InternalConfirmationView.java:278)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
    at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Caused by: com.sap.sup.admin.abap.rfc.exception.RfcExecutionException: The function named 'CCMSBI_RUN_SIMPLE_SETUP_IN_BTC' doesn't exist!
    at com.sap.sup.admin.abap.rfc.function.RfcFunction.execute(RfcFunction.java:62)
    ... 37 more
    And also this one>>
    Step RFC Details
    Failed to create TCP/IP RFC on ABAP side (SM59)
    !! Exception :      Source system cannot be set to Unicode                              , error key: RFC_ERROR_SYSTEM_FAILURE
    Exceptions
    com.sap.aii.proxy.framework.core.BaseProxyException:      Source system cannot be set to Unicode                              , error key: RFC_ERROR_SYSTEM_FAILURE
    at com.sap.aii.proxy.framework.core.AbstractProxy.send$(AbstractProxy.java:150)
    at com.sap.sup.admin.setup.abapproxy.tcpiprfc.TcpIpRfcProxy_PortType.inst_Create_Tcpip_Rfcdest(TcpIpRfcProxy_PortType.java:16)
    at com.sap.sup.admin.setup.ManagingServices.createTcpIpRFC(ManagingServices.java:663)
    at com.sap.sup.admin.setup.ManagingServices.createTcpIpRFC(ManagingServices.java:637)
    at com.sap.sup.admin.setup.SetupStep.execute(SetupStep.java:300)
    at com.sap.smd.agent.plugins.remotesetup.SapInstance.setup(SapInstance.java:304)
    at com.sap.sup.admin.setup.wizard.monitoring.ConfirmationView.setupSMDServer(ConfirmationView.java:378)
    at com.sap.sup.admin.setup.wizard.monitoring.ConfirmationView.onActionSetupServer(ConfirmationView.java:211)
    at com.sap.sup.admin.setup.wizard.monitoring.wdp.InternalConfirmationView.wdInvokeEventHandler(InternalConfirmationView.java:278)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
    at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    And in the troubleshooting setup for managed systems, i can see that no initial upload was found form the SMD agent which is running on Java System.
    Thanks a lot for your remarks

  • Business Components for Java & XML

    In the application I am currently developing, I am using XML metadata to communicate between a web browser and servlets (the xml is parsed by a servlet using an XSL stylesheet to output plain html). To build the XML, I am using the XML SQL utility and the following code:
    try{
    dset = new OracleXMLDataSetExtJdbc(conn, (Reader)sqlStr);
    dset.refreshDataSet();
    }catch (Exception ex){}
    OracleXMLDocGen doc = (OracleXMLDocGen) new OracleXMLDocGenString();
    OracleXMLQuery qry = new OracleXMLQuery(dset);
    qry.setRaiseException(true);
    qry.getXML(doc, qry.DTD);
    My question involves Oracle's Business components for Java. We have recently been doing more research into this technology and the features of it are quite appealing. However, as far as I can tell, there is no way to use the Oracle XML Utilities in conjunction with the BC4J. ie. XML is created based on a view object, not a SQL query to the Database.
    Does anyone know of any way of acheiving this XML generation based on a BC4J foundation?

    A BC4J View Object is effectively a Java component that represents a database query.
    The key difference is that the view object exposes a rowset API to work with which is
    fully updateable, fully scrollable, and automatically coordinated with underlying business logic which you have encapsulated into your companion entity objects (another BC4J Framework building-block component). View objects can also be used to create any interesting hierarchy of master/detail/detail queried database information using "View Links" to link the View Objects together. This allows you to effectively work with a "tree" of data that is perfectly shaped and filtered to the needs of the task at hand -- including self-referential "parts-explosion" kind of view links.
    In JDeveloper 3.1, BC4J ships with a utility class called oracle.jbo.xml.XmlRowSetRenderer which automatically supports rendering the results
    of any view object (and its "tree" of view-linked view objects) as XML, either in DOM format or into a Writer.
    In JDeveloper 3.2 (the next major release) the B2B XML features of the BC4J framework are further enhanced by supporting true, bidirectional XML-in and XML-out for any view object. This means that an XML message can be "fed" to any view object and it natively knows how to handle inserts, update, deletes and (most importantly) enforcement off all shared business logic from the underlying, related entity objects.

  • Accessing knowledge management documents using webdynpro for java

    Dear all,
    iam having some documnets in KNLOWLEDGE MANAGEMENT documents folder in portal using webdynpro for java clicking on a link means perner(employee no) i should get that perpicular employee number documents.
    examples documents are stored like this in knowledege management folder 20016319.pdf  ,  20016397.pdf  ,  20016398.
    how to access those employee using webdynpro for java for perticular employee number if i want 20016319
    Send me the code for above requirement and where i have to wrirte that code exactly
    Regards

    Dear Kishore,
    To get the Employee ID you have to create a Adaptive RFC Model (call BAPI) which will return you the employee pernr, for this
    1. Create a model using  : BAPI_EMPLOYEE_GETDATA
    2. Get User ID using the code
    public java.lang.String getUserID( )
        //@@begin getUserID()
         String userID = new String();
              try
                    // getting Logged in userid
                   IWDClientUser myUser = WDClientUser.getCurrentUser();
                   userID = myUser.toString().substring(19).trim();
                   StringTokenizer filterdUID = new StringTokenizer(userID,")");
                   userID = filterdUID.nextToken();
              catch (WDUMException e)
                   e.printStackTrace();
                   return userID;
        //@@end
    3. Execute the BAPI
    public java.lang.String getEmployeeID( java.lang.String userID )
        //@@begin getEmployeeID()
         String employeeID = new String();
              Bapi_Employee_Getdata_Input employeeData = new Bapi_Employee_Getdata_Input();
              Bapi_Employee_Getdata_Output outData = new Bapi_Employee_Getdata_Output();
              Bapip0105B comm = new Bapip0105B();
              com.sap.aii.proxy.framework.core.AbstractList list = new Bapip0105B.Bapip0105B_List();
              list.add(comm);
              employeeData.setUserid(userID);
              Calendar cal = Calendar.getInstance(Locale.UK);
              Date date = new Date(cal.getTimeInMillis());
              employeeData.setDate(date);
              employeeData.setAuthority_Check("");
              employeeData.setCommunication(list);
              outData.addCommunication(comm);
              wdContext.nodeBapi_Employee_Getdata_Input().bind(employeeData);
              wdContext.nodeOutput_BAPI().bind(outData);
            try
                   wdContext.nodeBapi_Employee_Getdata_Input().currentBapi_Employee_Getdata_InputElement().modelObject().execute();
                   wdContext.nodeOutput_BAPI().invalidate();
            catch (WDDynamicRFCExecuteException e) {printMsg("Failed to Obtain Employee Data");
                 e.printStackTrace();
            employeeID = wdContext.nodeBapi_Employee_Getdata_Input().nodeOutput_BAPI().nodeOrg_Assignment().currentOrg_AssignmentElement().getPerno();
            return employeeID;
        //@@end
    Hope it Helps!!
    Warm Regards
    Upendra Agrawal

  • Is there a active record class similar to the one in codeigniter for java

    I was wondering if there's a way to build sql statements in java similar to active record in codeigniter which is a PHP framework. Basically you call functions that builds your sql statements like so:
    db.from('users');
    db.select('id');
    db.where('name', name);
    results = db.get();
    instead of something like this:
    "select id from users where name='" + name + '";
    Top methods cleaner, easier to read and modify, and less likely to miss a punctuation. Is there a class that does something like this for java. Sorry haven't used Java in awhile and just trying to get back in.

    >
    instead of something like this:
    "select id from users where name='" + name + '";
    Nope - the correct way is to use a prepared statement.
    Top methods cleaner, easier to read and modify, and less likely to miss a punctuation. None of those would be true for the way I write code.
    And I doubt that any of those would be true for non-trivial examples, for example a union with several complex clauses. And absolutely useless if you need a dba who is only a dba to help with your SQL.
    Is there a class that does something like this for java. Sorry haven't used Java in awhile and just trying to get back in.Not in the standard API there isn't.

  • Latest PATCH for java engine 2004s_SR1 ( 7.00, SP-Number: 06)

    hello,
             I have installed NW 2004s_SR1 in a clustered environment.
    I am looking for "Latest <u><b>PATCH for java engine</b>"</u>.
    Current j2EE version details are as:
    Specifies the version of the system
    <b>Cluster-Version: 7.00   PatchLevel  </b>
    Build-On:Saturday, March 04, 2006 16:23 GMT
    Perforce-Server:
    Project-Dir:JKernel/NW04S_06_REL
    JKernel Change-List:10168
    Build machine:SAPInternal
    Build java version:1.3.1_12-b03 Sun Microsystems Inc.
    <b>SP-Number: 06</b>
    Source-Dir: D:\make\engine\NW04S_06_REL\builds\JKernel\NW04S_06_REL\archive\dbg
    Does any one has idea about it..(exact path & file names)
    Regards
    Sunil Kulkarni
    PS: Rewarding points will be given for helpful answer.

    Hi Sunil,
    Below are the components you need to install for updating the j2ee server..
    ADOBE DOCUMENT SERVICES 7.00
    BI META MODEL REPOSITORY 7.00
    BI UDI 7.00
    DI BUILD TOOL 7.00
    J2EE ENGINE BASE TABLES 7.00
    J2EE ENGINE CORE TOOLS 7.00
    JAVA LOG VIEWER 7.00
    JAVA SP MANAGER 7.00
    LIFECYCLE MGMT TOOLS 7.00
    SAP CAF 7.00
    SAP CAF-UM 7.00
    SAP IGS 7.00
    SAP J2EE ENGINE 7.00
    SAP J2EE ENGINE CORE 7.00
    SAP JAVA TECH SERVICES 7.00
    SAP SOFTW. DELIV. MANAGER 7.00
    SAP STARTUP FRAMEWORK 7.00
    SAP TECH S 7.00 OFFLINE
    SAP VIRUS SCAN INTERFACE 7.00
    SAP_IKS_7.00
    UME ADMINISTRATION 7.00
    First update the JSPM version and then use the updated JSPM to upgrade the above components.
    The sequence of installlation will be taken care by
    JSPM itself..
    There are two suggestions I would like to make.
    1. If you upgrade j2ee Engine ,please upgrade other usage types EP , XI etc if any to the same SP level.
    2. Please stick on the SP06 as it is the most stable version available with maximum hotfixes as other SP's have lot of problem in some component or the other. From SP07-SP09 none of them are stable and SP10 is relatively new and so bugs also would be new!!..
    the follwing is the path in the service market place where u can find all the components listed.
    Support Packages and Patches"-->SAP NetWeaver" --> NETWEAVER" -->SAP NETWEAVER 2004S" -->Entry by Component" -->Application Server Java
    Hope the above info is usefull...
    Regards,
    Ramesh Parameswaran

  • Document 'Installing the PDK-Java Framework and samples v2' not found Urgent!!

    Hello,
    I want to install the PDK_url samples, but I have had no luck at the moment.
    I have a PDK already installed, working fine.
    I have downloaded the PDK (V2) available at this moment in the PortalStudio page, but I have the next problems:
    * my portal version is 3.0.9.8.0 (a bit lower than the recommended)
    * the url for the installation document is not working correctly, so I don4t have this document.
    I have downloaded the pdk_url samples and extracted the files, and tried to follow the 'Installing the PDK-URL Services Samples'
    but as the versions (v1-v2) are different, I can4t follow the steps.
    Where could I find this document, or a PDK-url version for my portal version.
    Thanks

    PDK-Java v2 and the URL-based samples require OC4J, available for download on OTN. When you say that you have installed the PDK samples, do you have them running on Apache (under your 3.0.9 portal), or on OC4J?
    I could open the v2 installation documents without any issues:
    Installing the PDK-Java Framework and Samples and Installing the PDK-URL Services Sample (V2).
    Hope this helps.
    Peter

  • Business Components for Java entity beans of J2EE

    What is the future of Business Components for Java with the new standard entity beans of the sun Java 2 Entreprise Edition?
    Thanks.
    null

    The Standard Entity Beans are a component (JavaBean) that can be a small piece of the ultimate application needs.
    Oracle Business Component for Java is a complete framework that has numerous features that make developing COMPLETE applications easy.
    Please download the white paper on Business Components, try your hand at creating an application with Business Components (using the wizards) and you will see that Business Components for Java is much more than a simple (/complex) reusable component, it is a complete framework which maked developing N-tier applications almost trivial by allowing you to focus on writing your business logic while the framework takes care of all the application infrastructure and the necessary plumbing.
    Sincerely,
    John@Oracle JDeveloper Team http://technet.oracle.com
    null

  • Can't see portlet provider of pdk-java Framework

    i have installed the pdk-java framework and samples and i have registred a poprtlet provider called " SampleWebProvider".
    when i open the portlet ripository i can't find this provider displayed

    It means while accessing this url
    http://servername.domain.com:7777/servlet/sample
    did u get this testpage... hello
    we have the SAME problem of Hela Abidi!!
    when we access the test page we get this:
    ---------------------------------------->
    Congratulations! You have successfully reached your Provider's Test Page.
    Checking for components:
    Portlets are:
    SampleRenderer
    Lottery
    Snoop
    HelloWorldJsp
    ExpiresSample
    ValidateSample
    HelloWorld
    FormInput
    Multipage
    JSPServicesPortlet
    SubscriberRegistration
    HelloServletWorld
    submitServlet
    Recognizing initialization parameters.
    invalidation_caching : true
    <----------------------------------------------
    it is a bit different from your test page... different PDKv2 version??
    however it seems to be all ok with OC4J... and I can say more: if I click in "Browse Providers" icon inside Portal>Administer tab>Provider I can see my new SampleWebProvider!! but I can't see it in the portlet repository :-(
    this is our system:
    Os: Win 2000 server
    Db 9i 9.0.1.3.1
    Portal version 3.0.9.8.2
    OC4J Release 2 Developer preview (9.0.3.0.0)
    can you help us??
    thanks

Maybe you are looking for

  • Can I use the same SSI twice in same page?

    Hey all, i'm having a problem whereby several SSI's are not showing on my page. I'm wondering if it's because the instances that are not showing are the ones called the second time round. Before i start posting code etc, i just wondered if it was act

  • Wrong port in FTP receiver adapter - no errors in message monitoring?

    Hello all We're on XI 3.0 SP16 and have created / configured a HTTP XML -> XI -> FTP Server scenario. In the receiver comm. channel (ftp) we had specified a wrong port number and always wondered, why we never got errors in message monitoring. Everyth

  • 11g Sampleapp connection timed out

    When I try to download the sample app it redirects to the URL below and times out.... in FF and IE... Please fix... http://www.samplecode.oracle.com:7777/SSOLogin?redirectUrl=https%3A%2F%2Fwww.samplecode.oracle.com%2Fsf%2Fpluggable%2Fdo%2FviewPluggab

  • Calleing dbms_job from a package owned by someone else.

    I have a package, called database_job, which acts as a api to dbms_job. I have created a public synonym and granted execute to public. Problem is whan I call this procedure from a user trying to alter one of there jobs I get the error ora-23421: Job

  • Error while trying to test an external WS deployed via the ESB

    Hi, The registering of an ESB project that contains a SOAP Service pointing to an external wsdl went fine. However, when I tried to test it, I'm getting the following error: __soap_EIDDataService_EIDDataService Operation : getEIDInfo HTML Form XML So