Monday, 5 November 2007
|
| itext and xfa/xdp forms Guest 10:03:12 |
| | Hi all,
As You probably know, since Designer 6.0/Acrobat/Reader 6.02 Adobe included the Accelio form technology they bought in 2002. The new form creation process is xml based and form data is submitted in the new xdp format - not in xfdf any more. The complete form structure including its layout is embedded as xml in the pdf file in the same xdp xml schema. The Designer creates corresponding pdf form ui elements when you save the pdf file.
Although there is limited documentation, we decided to use this new stuff for form creation process instead of the old deprecated (Contrary to MS with InfoPath, Adobe does not force you to use their expensive clients/servers to handle the new form technology. A simple web server and some xml parsing is enough).
My Questions (assuming a form created with designer):
- Is there a way to access the embedded xdp data with itext, modify it with some xml parser and save the pdf as a valid/usable form again? (We would like to modify default values and the access status (readonly/readwrite) to use the same form to visualize content previously submitted?)
- Is someone working on itext to support the new stuff? When we get further with this, we would like to contribute our experiences concerning this matter to someone
- The form content in the new style pdf form is somehow redundant, e.g. if you use a choice list with some values to choose, the pdf file contains them at least twice, once in the pdf portion, once in the embedded xdp/xml. Has someone already figured out what is relevant, when the form is processed by Reader/Acrobat?
Thanks in advance and a prosperous new year to you all!
Kolja
-- +++ Sparen Sie mit GMX DSL +++ http://www.gmx.net/de/go/dsl AKTION fr Wechsler: DSL-Tarife ab 3,99 EUR/Monat + Startguthaben
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
|
| | 9 answers | Add comment |
Friday, 26 October 2007
Thursday, 25 October 2007
|
| Summary of Network logging for Java desktop application Frank Harper 09:54:01 |
| | I thought a recap on logging for Java desktop applications might be helpful.
Will Sargent and Vitor Buitoni both recommended using log4j. Log4j has several client and server side options one of which is a unix syslog appender. The fire and forget nature of unix syslog which runs over unconfirmed UDP is particularly appealing to me since some machines on which the app is installed might not be able to reach the logging server at all. Using syslog should reduce the risk of destabilizing the app as mentioned by Peter Booth. One concern with using log4j, is that we are currently using J2SE logging framework provided by Sun, switching to log4j would require updating logging code throughout the app.
Jeff Kesselman said that he was perfectly satisfied with the J2SE logging framework, but didn't say what he recommended using on the server side.
Peter Booth recommended Capistrano (http://www.capify.org/), which is a Ruby based tool for automating tasks using SSH. One thing I forgot to mention is that my app runs on Windows. If I have understood Peter's suggestion, correctly implementing his idea with Capistrano would require installing an SSH server on each Windows box on which the my app runs. In my case, this is not a realistic option.
Thanks to all those who took the time to reply.
Frank Harper On 10/20/07, Peter Booth <pbooth@nocoincidences.com> wrote:
Do you really want to make your application's reliability and performance dependent on the health of the network logging mechanism? If Call me conservative but I would much prefer to log locally and use a decoupled mechanism for log file aggregation. Capistrano, for example can make this trivial across OSes. Peter On Oct 19, 2007, at 10:41 AM, Frank Harper wrote: I have a java desktop application that is installed locally on users machines via Java Web Start, and would like to centralize the facilitate diagnosing bugs. The app uses the standard java logging framework that comes with J2SE. Apparently with this logging framework the standard way to do network logging is to use java.util.logging.SocketHandler. I couldn't find any complete examples on the Web, and the documentation is completely what should be running on the server side to collect the So, have any of you done network logging in Java, and what software use? Did you use J2SE+SocketHandler, classic unix syslog, Log4J, or something better/different? And in particular what software did you =================================== View archives and manage your subscription(s) at http:// =================================== View archives and manage your subscription(s) at =================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 2 answer | Add comment |
|
| GC issues Avinash Lakshman 09:26:52 |
| | Hi All
We are trying to profile our software on a single server in order to determine how many transactions per second it can handle. We were trying to figure out to what extent we can push it to. What we are observing is that things run fine on the server for like an hour and then everything goes haywire. We tried to dump the GC details and figured that the full times are on an average 15 secs (snapshot shown below). I am using the following VM options -Xms1024M -Xmx4096M -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=50. How do I go about tuning this? I am sure one of you might have more insight and point in the right direction as to what the next steps should be for me. Please advice
GC details snapshot:
[Full GC [Tenured: 3478911K->3478911K(3478912K), 14.9602090 secs] 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], 14.9604460 secs] [Full GC [Tenured: 3478911K->3478911K(3478912K), 14.9600190 secs] 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], 14.9602830 secs] [Full GC [Tenured: 3478911K->3478911K(3478912K), 14.9943380 secs] 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], 14.9946070 secs] [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0132030 secs] 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], 15.0135150 secs] [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0087010 secs] 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], 15.0089700 secs] [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0059100 secs] 5044415K->5044282K(5044416K), [Perm : 14286K->14286K(21248K)], 15.0062270 secs]
Exception in thread "ROW-MUTATION:7" java.lang.OutOfMemoryError: Java heap space
[Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0145700 secs] 5044415K->5044308K(5044416K), [Perm : 14286K->14286K(21248K)], 15.0148770 secs] [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0113510 secs] 5044415K->5044330K(5044416K), [Perm : 14286K->14286K(21248K)], 15.0116270 secs] [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0235560 secs] 5044415K->5044354K(5044416K), [Perm : 14286K->14286K(21248K)], 15.0238610 secs] [Full GC [Tenured: 3478911K->3478911K(3478912K), 18.5820490 secs] 5044415K->5044372K(5044416K), [Perm : 14286K->14286K(21248K)], 18.5823870 secs] [Full GC [Tenured: 3478911K->3478911K(3478912K), 14.9996820 secs] 5044415K->5044393K(5044416K), [Perm : 14286K->14286K(21248K)], 14.9999700 secs]
Thanks A
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 1 answer | Add comment |
Wednesday, 24 October 2007
|
| how to rotate cells in rtf table Antonio Cicero 14:59:44 |
| | hi, I wish to know if is it possible to rotate text into a cell in a RTF table (using com.lowagie.text.rtf.RtfWriter package) thanks for help
Antonio
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
|
| | 2 answer | Add comment |
Saturday, 20 October 2007
|
| Network logging for Java desktop application Frank Harper 07:17:06 |
| | I have a java desktop application that is installed locally on users machines via Java Web Start, and would like to centralize the logging to facilitate diagnosing bugs.
The app uses the standard java logging framework that comes with J2SE. Apparently with this logging framework the standard way to do network logging is to use java.util.logging.SocketHandler. I couldn't find any complete examples on the Web, and the documentation is completely mute about what should be running on the server side to collect the information sent by SocketHandler.
So, have any of you done network logging in Java, and what software did you use? Did you use J2SE+SocketHandler, classic unix syslog, Log4J, or something better/different? And in particular what software did you run on the log server?
Thanks Frank
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 5 answers | Add comment |
|
| [JBoss Seam] - Question:
http://java.sun.com/jsp/jstl/core cannot be resolv Fito10 01:44:00 |
| | Hello I try to run the dvdstore-sample with eclipse. I can build and deploy the code, but when I try to run the application I receive the following error:
007-01-05 09:34:22,437 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception handled by Seam org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595)
Does anybody know the correct uri?
Thanks, Tobias
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998639#3998639
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998639
|
| | 2 answer | Add comment |
Tuesday, 16 October 2007
|
| R: [PHP] Get current URL N E T B R A I N 18:41:20 |
| | Well,
about the request url, there is a way in order to get an HTTP_HOST var that contains a user? I mean: for this http://user@myhost.com/ , I need to get the *user* ...
many thanks in advance max
That'll give you www.example.com/path/to/file.php?arg=val for example, but> the http:// or https:// isn't there. To see that, you'd need to check> what $SERVER_PROTOCOL was (HTTP/1.0, for example), unless it's safe in> your situation to just assume it'll be http.> $SERVER_NAME doesn't include the port, so it isn't as reliable as> $HTTP_HOST. Additionally, $SCRIPT_NAME doesn't include any get parameters> that may have been sent.> For a complete listing of all the variables available in your environment,> load a page containing <?php phpinfo() ?> and look over the 'Apache> Environment' section.> Matt
|
| | 1 answer | Add comment |
Monday, 8 October 2007
|
| [EJB/JBoss] - EJBQL - How to get a field from a query Warx_sg 22:05:05 |
| | Hi all,
i have the following ejbql query :
"select distinct a.name from A as a where a.name is not null"
the quey give me back a collection, but when i try to cast an object of this collection i got a ClasscastException. What kind of objects are contained in this collection ? The name attribute is a String, but the collection doesn't contain strings. I use EJBQL 2.0. Any idea ? Cheers.
Stefano
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935813#3935813
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3935813
------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
|
| | 1 answer | Add comment |
|
| What is the behaviour of double / float primitive == comparison? Carfield Yim 13:49:23 |
| | I am not really clear about the definition of JLS:
Otherwise, two distinct floating-point values are considered unequal by the equality operators. In particular, there is one value representing positive infinity and one value representing negative infinity; each compares equal only to itself, and each compares unequal to all other values.
http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#5198
Say for following case, will this print true?
System.out.println( 3.0/7.0 == 1.5/3.5 )
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 5 answers | Add comment |
Saturday, 6 October 2007
|
| Escape Analysis for stack allocation Avinash Lakshman 07:43:22 |
| | Hi All
Is this going to be supported in the Java 6 ? If not does anyone know if it is supported in the IBM JVM ? I tried searching online but I am getting confused with the results I seem to be getting. Does -XX:+DoEscapeAnalysis do anything at all ?
Thanks A
_________________________________________________________________ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033 =================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | Add comment |
Thursday, 4 October 2007
|
| [JBoss Portal] - DispatchedHttpServletRequest and related jstl fmt problem L.Forni 11:15:02 |
| | Hi all,
I found this topics: 1) http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76350 (previous post of mine) 2) http://www.jboss.com/index.html?module=bb&op=viewtopic&t=70971
Finally i found where is the problem...
The following methods of org.jboss.portal.portlet.impl.DispatchedHttpServletRequest return null values. Looking at the code, i saw a comment that said what they have to do.
Modified methods:
// Must be based on properties provided by the getProperties method of the PortletRequest interface
public String getHeader(String s) { return rreq.getProperty(s); }
public Enumeration getHeaders(String s) { return rreq.getProperties(s); }
public Enumeration getHeaderNames() { return rreq.getPropertyNames(); }
With this modification, jstl fmt doesn't throw NullPointerException anymore, but now locale is choosen by language's browser settings.
So now i have to use language preferences of the user logged in (if set it). The first solution that i found is to modify org.jboss.portal.portlet.impl.PortletRequestImpl . I'm not satisfied with this, it seems to be a workaround!! But it works! If user logged in has a preferred language, will be used it, otherwise will be used default language.
Modified methods:
// PLT.11.1.4
public String getProperty(String name) { if (name.equalsIgnoreCase("accept-language")){ return getLocale().toString(); } return requestContext.getPropertyValue(name); }
public Enumeration getProperties(String name) { if (name.equalsIgnoreCase("accept-language")){ Vector v = new Vector(); v.add(userContext.getLocale().toString()); return v.elements(); }
return requestContext.getPropertyValues(name); }
public Enumeration getPropertyNames() { Set names = requestContext.getPropertyNames(); return Collections.enumeration(names); }
and
public Enumeration getLocales() { Vector v = new Vector(); v.add(userContext.getLocale()); return v.elements(); }
One question: if i would like to let an anonymous user to choose a language different from that is shown... how can i do this? any idea?
Unfortunately i haven't much time to understand well the build process of jboss portal, so i can't write a Unit Test for this. (if someone has some documentation to point me, i'm very interested to contribute to this project!)
PS: I have setup an enviroment of JBP 2.2.1RC2 + eclipse to develop and debug portlet. May i write a tutorial? (if someone is interested)
Hope this helps!!
Great works! Thanx to all!!
Luca Forni
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922180#3922180
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922180
------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
|
| | 1 answer | Add comment |
Thursday, 27 September 2007
|
| [EJB 3.0] - deleting entities from a Collection Aberezin 17:16:10 |
| | Sorry if this is a bit of a repost. I am trying to figure out the best way to remove enties from a OneToMany collection (either uni or bidirectional).
I have an entity Foo, that contains a OneToMany Set: Set getBars()
If I add new Bar objects to the set and call em.merge(myFoo), it properly persists the new Bar objects. However, simply removing Bar objects from the set and calling em.merge(myFoo) does not remove the underlying Bar objects from the db. It seems I have to explicitly call em.remove(myBar1), ...
Is this how thinks are suppose to work? I could see in a ManyToMany that you could not delete the underlying row simply because it is no longer in the Set. However, in a OneToMany, it would seem that the any Bar objects no longer in the set should be deleted.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970179#3970179
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970179
|
| | Add comment |
Saturday, 22 September 2007
|
| Runtime.exec() Avinash Lakshman 05:46:48 |
| | Hi All
Are there any gotchas one would have to bear in mind for a launching a Java program using Runtime.exec() ? Whenever I try launching a Java program using Runtime.exec() the program displays unpredicatable behavior which is not observed if it were launched directly from the command line.
Any ideas/experiences that someone could share ?
Thanks A
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 11 answers | Add comment |
Thursday, 20 September 2007
|
| Java Generics - "super" keyword usage Avinash Lakshman 23:14:23 |
| | Hi All
This has been driving me insane. I am pretty sure it is very simple and hopefully someone can clear this up for me. What is wrong with the following:
public <T super IColumn> ICompactSerializer<T> serializer() { return new MyColumnSerializer(); }
class MyColumnSerializer implements ICompactSerializer<MyColumn> { public void serialize(MyColumn column, DataOutputStream dos) throws IOException { }
public MyColumn deserialize(DataInputStream dis) throws IOException { return null; } }
It complains about the "super" keyword. However the same compiles with the "extends" keyword. Now this method is defined in an interface called IColumn. I want any class that implements this serializer() method to pass its type to the ICompactSerializer template argument. Is this doable and if so what am I doing wrong?
Thanks Avinash
_________________________________________________________________ Can you find the hidden words? Take a break and play Seekadoo! http://club.live.com/seekadoo.aspx?icid=seek_wlmailtextlink =================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 7 answers | Add comment |
Friday, 14 September 2007
Thursday, 13 September 2007
|
| Decrease JIT time Rodrick Brown 18:52:54 |
| | I found the following JVM tunable from IBM for os400 I was wondering if there was a similar optiomization that can be used on Linux x64 hosts I'm running Sun JDK 6 update 2.
Using the Just-In-Time (JIT) compiler with the Mixed-Mode Interpreter (MMI) results in startup performance that almost equals that of compiled code. MMI interprets your Java code until reaching the threshold specified by the os400.jit.mmi.threshold Java system property. After reaching the threshold, OS/400 spends the time and resources required to use the JIT compiler to compile a method on the most frequently used methods. Using the JIT compiler results in highly optimized code that improves runtime performance when compared to precompiled code. When you require improved startup performance with the JIT compiler, you can use CRTJVAPGM to create an optimized Java program object.
Thanks.
---------- Forwarded message ---------- From: Brown, Rodrick <rodrick.brown@lehman.com> Date: Sep 11, 2007 9:34 AM Subject: JIT optimization To: rodrick.brown@gmail.com
Using the Just-In-Time (JIT) compiler with the Mixed-Mode Interpreter (MMI) results in startup performance that almost equals that of compiled code. MMI interprets your Java code until reaching the threshold specified by the os400.jit.mmi.threshold Java system property. After reaching the threshold, OS/400 spends the time and resources required to use the JIT compiler to compile a method on the most frequently used methods. Using the JIT compiler results in highly optimized code that improves runtime performance when compared to precompiled code. When you require improved startup performance with the JIT compiler, you can use CRTJVAPGM to create an optimized Java program object.
LEHMAN BROTHERS Production Management Equities Technology / Client Connectivity 1301 Ave. of the Americas, 3rd Floor New York, NY 10019 (P): 212.320.0892 rodrick.brown@lehman.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
-------- IRS Circular 230 Disclosure: Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.
-- Rodrick R. Brown http://www.rodrickbrown.com
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 6 answers | Add comment |
Wednesday, 12 September 2007
|
| cvs down? Marc Fleury 17:48:51 |
| | I can't do a CO
marcf
xxxxxxxxxxxxxxxxx Marc Fleury, Ph.D President JBoss Group, LLC xxxxxxxxxxxxxxxxx
------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/
|
| | 3 answer | Add comment |
Sunday, 9 September 2007
|
| Puzzling class field initialization order Attila Szegedi 06:30:45 |
| | Hi folks,
I observed an interesting behaviour in initialization of static fields, and am unable to understand it. Can anyone help? Here's the code distilled to absolute minimum demonstrating the problem, in four classes:
S.java: ======= class S { static final C IMPL = C.INSTANCE; }
I.java: ======= interface I { static final C IMPL = C.INSTANCE; }
C.java: ======= class C extends S implements I { static final C INSTANCE = new C(); }
X.java: ======= public class X { public static void main(String[] args) { C c = new C(); System.out.println(S.IMPL); System.out.println(I.IMPL); } }
Running X prints null for S.IMPL, as expected, since S.IMPL was initialized before C.INSTANCE when C was loaded. That's perfectly understandable.
*However* it prints a non-null instance for I.IMPL, i.e. "C@2e7263"! Now, anyone care to explain why isn't I.IMPL null as well? It is likely something related to a difference in loading a superclass vs. loading a superinterface, but if anyone has a definitive explanation (a pointer to the relevant JVM spec section will suffice , I'd appreciate that.
BTW, Java runtime version is:
java version "1.5.0_07" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164) Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
Thanks, Attila.
-- home: http://www.szegedi.org weblog: http://constc.blogspot.com
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 9 answers | Add comment |
Friday, 7 September 2007
|
| OO JavaScript or PHP Unknown Sender 22:26:33 |
| | I was ust wondering if there are any editors that would make OO development with PHP or JavaScript a bit easier.. Of course JS is not completely an OO language, but to some degree... Are there any tools similar to VC++ or C++ builder for either JS or PHP?
~Peter
|
| | 2 answer | Add comment |
Wednesday, 5 September 2007
|
| Open Source JSP Collaborative Website Management Adam Memisyazici 00:13:03 |
| | Does anyone know of a good open-source collaborative website management software written in JSP? I am looking for something in the lines of "Template-objects-in-a-list" design where the administrator/designer gets to define HTML structures (ex. A blue table 300 by 200 with a title and a subject) and gives parts of that template to be edited by different roles, but to the anyonymous guest user just visiting the website appears uneditable. A strictly authorative, templates based, highly visually customizable content management written in JSP and is open-source.
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 2 answer | Add comment |
Sunday, 2 September 2007
|
| Performance penalty of using private variable in inner class Carfield Yim 00:25:12 |
| | I get the followng warning from eclipse 2.0 to 3.3
"Read access to enclosing field Class.Variable is emulated by a synthetic accessor method. Increasing its visibility will improve your performance"
Is that still true for new version of JVM? And actually what is the difference if there still performance penalty for forseeable future?
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 20 answers | Add comment |
Saturday, 1 September 2007
|
| Erased data type Ivan H Mann 00:19:37 |
| | I have an app with a gui that can develop a lot of data. There is a save button, which writes the data out using serialization.
Then, there is a load button, which reads the data back in, using this line:
destinations = (ArrayList<ScheduleDestination>) is.readObject() ;
Where destinations is defined elsewhere as ArrayList<ScheduleDestination> destinations ;
On the line that reads the object back in, there is a compiler flag:
Type Safety: The cast from Object to ArrayList<ScheduleDestination> is actually checking against the erased type ArrayList.
What does this flag mean? I have googled fairly creatively and can't find anything which tells me what it means or how to make it go away.
Ivan Mann
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 4 answer | Add comment |
Friday, 31 August 2007
|
| [JBoss Eclipse IDE (users)] - Problem creating the ejb-jar.xml file Giordano 07:06:06 |
| | Hi,
I tried to develop a simple Project with JBoss-ide 1.5 just released. I created a simple J2EE 1.4 Project with a simple Session Bean. Before the packaging I created the dd ejb-jar.xml file with the wizard.
I selected New->Other->JBoss-IDE->Descriptors->EJB 2.1 Deployment Descriptor but I obtained an old XML file (2.0 Deployment Descriptor referring to the DTD and to to a schema).
Please, I would like to know if this is a my mistake or a bug.
Many Thanks and Bye, Giordano
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3916441#3916441
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3916441
------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
|
| | 1 answer | Add comment |
Monday, 27 August 2007
|
| Update Java on the server? Adam Memisyazici 07:01:39 |
| | We have a 1.5 version of the JVM running on our production server, simply because that's what came with the Red Hat at the time. Is it wise to install the latest version? What is the latest "solid" version have you used which you saw no problems with?
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 5 answers | Add comment |
|