??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品国产国语,欧美亚洲国产SUV,亚洲乱码国产一区网址http://www.tkk7.com/wilesun/zh-cnThu, 03 Jul 2025 17:50:30 GMTThu, 03 Jul 2025 17:50:30 GMT60glassfish下的Eclipse的wtp插g的server runtime library问题http://www.tkk7.com/wilesun/archive/2013/08/14/402769.htmlwilesunwilesunWed, 14 Aug 2013 01:27:00 GMThttp://www.tkk7.com/wilesun/archive/2013/08/14/402769.htmlhttp://www.tkk7.com/wilesun/comments/402769.htmlhttp://www.tkk7.com/wilesun/archive/2013/08/14/402769.html#Feedback0http://www.tkk7.com/wilesun/comments/commentRss/402769.htmlhttp://www.tkk7.com/wilesun/services/trackbacks/402769.htmlSee the thread GlassFish Tools does not provide a Server Runtime for Java Build Path in the Oracle forum.

Summary: They no longer provide a "Server Runtime" for plain Java projects. Instead, the project needs to be a faceted project and have a target runtime.

To configure this, do the following:

  1. Go to the project properties > Project Facets
  2. If necessary, click on Convert to faceted form...
  3. In the Runtimes tab, select GlassFish 3.1

In case you need to export the GlassFish libraries to dependent projects, also do the following:

  1. In Project Facets properties, select Utility Module and click Apply
  2. In Java Build Path > Order and Export, select GlassFish System Libraries

    见:
    http://stackoverflow.com/questions/17204096/glassfish-server-library-not-available-in-eclipse-kepler


wilesun 2013-08-14 09:27 发表评论
]]>
MessageFormat的format和StringBuilderl合字符串比?/title><link>http://www.tkk7.com/wilesun/archive/2013/07/30/402157.html</link><dc:creator>wilesun</dc:creator><author>wilesun</author><pubDate>Tue, 30 Jul 2013 05:59:00 GMT</pubDate><guid>http://www.tkk7.com/wilesun/archive/2013/07/30/402157.html</guid><wfw:comment>http://www.tkk7.com/wilesun/comments/402157.html</wfw:comment><comments>http://www.tkk7.com/wilesun/archive/2013/07/30/402157.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/wilesun/comments/commentRss/402157.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/wilesun/services/trackbacks/402157.html</trackback:ping><description><![CDATA[<div>单的试代码如下:<br />旉?<br />StringBuilder        346887ns<br />MessageFormat    2956450ns<br />看来StringBuilder快了一个数量Q因此还是用StringBuilder?br /><br /><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080; "> 1</span>         String str[] = { "11111", "222222222", "333333333333", "444444444444444444444444444" };<br /><span style="color: #008080; "> 2</span>         <span style="color: #0000FF; ">long</span> l = System.nanoTime();<br /><span style="color: #008080; "> 3</span>         <span style="color: #0000FF; ">for</span> (<span style="color: #0000FF; ">int</span> i = 0; i < 100; i++) {<br /><span style="color: #008080; "> 4</span>             String c = <span style="color: #0000FF; ">new</span> StringBuilder(str[0]).append(str[1]).append(str[2]).append(str[3]).toString();<br /><span style="color: #008080; "> 5</span>         }<br /><span style="color: #008080; "> 6</span>         System.out.println(System.nanoTime() - l);<br /><span style="color: #008080; "> 7</span> <br /><span style="color: #008080; "> 8</span>         MessageFormat format = <span style="color: #0000FF; ">new</span> MessageFormat("{0}{1}{2}{3}");<br /><span style="color: #008080; "> 9</span>         l = System.nanoTime();<br /><span style="color: #008080; ">10</span>         <span style="color: #0000FF; ">for</span> (<span style="color: #0000FF; ">int</span> i = 0; i < 100; i++) {<br /><span style="color: #008080; ">11</span>             String c = format.format(str);<br /><span style="color: #008080; ">12</span>         }<br /><span style="color: #008080; ">13</span>         System.out.println(System.nanoTime() - l);</div></div><div></div><img src ="http://www.tkk7.com/wilesun/aggbug/402157.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/wilesun/" target="_blank">wilesun</a> 2013-07-30 13:59 <a href="http://www.tkk7.com/wilesun/archive/2013/07/30/402157.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Configuring Oracle for XAhttp://www.tkk7.com/wilesun/archive/2013/07/26/401984.htmlwilesunwilesunFri, 26 Jul 2013 01:45:00 GMThttp://www.tkk7.com/wilesun/archive/2013/07/26/401984.htmlhttp://www.tkk7.com/wilesun/comments/401984.htmlhttp://www.tkk7.com/wilesun/archive/2013/07/26/401984.html#Feedback0http://www.tkk7.com/wilesun/comments/commentRss/401984.htmlhttp://www.tkk7.com/wilesun/services/trackbacks/401984.htmlConfiguring Oracle for XA

  • Oracle 10.2.0.3 and lower
  • Oracle 10.2.0.4, 11g and higher

Oracle 10.2.0.3 and lower

NOTE: this tip was written with Oracle DBMS version 10.2.0.2.0

How can you know if your Oracle server is correctly configured for XA?

The simplest and usually the most effective way is the following:

  • logon to SQLPlus (or use another tool if you like); make sure to use the user/password that you are using for your application
  • execute the query: select * from SYS.DBA_PENDING_TRANSACTIONS;

If this works then XA is configured.

If not then you should do one or all of the following:

  1. run the oracle scripts 'initxa.sql' and 'xaview.sql' (or ask your DBA to do this for you).
  2. ask your DBA to grant select rights (to your user) on SYS.DBA_PENDING_TRANSACTIONS
  3. for the driver ojdbc14.jar, you also need execute rights on SYS.DBMS_SYSTEM

The last step is NOT needed for the older (JDK 1.2) drivers in classes12.jar

Oracle 10.2.0.4, 11g and higher

For Oracle 10.2.0.4 and up, you no longer need execute rights on SYS.DBMS_SYSTEM. This was fixed in Oracle 10.2.0.4 (BUG 5945463).

Make sure you are also using client driver ojdbc14 version 10.2.0.4 and up.



wilesun 2013-07-26 09:45 发表评论
]]>
FWK005 parse may not be called while parsing.http://www.tkk7.com/wilesun/archive/2012/05/09/377723.htmlwilesunwilesunWed, 09 May 2012 09:18:00 GMThttp://www.tkk7.com/wilesun/archive/2012/05/09/377723.htmlhttp://www.tkk7.com/wilesun/comments/377723.htmlhttp://www.tkk7.com/wilesun/archive/2012/05/09/377723.html#Feedback0http://www.tkk7.com/wilesun/comments/commentRss/377723.htmlhttp://www.tkk7.com/wilesun/services/trackbacks/377723.html 

最q在使用javax.xml.parsers.DocumentBuilder解析xml文g的时候偶会出错Q?/p>

 

org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:
263)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:
284)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:
208)

 

跟踪了一下代码,发现q个异常是在com.sun.org.apache.xerces.internal.parsers.DTDConfiguration.parse(DTDConfiguration.java:546)抛出来的。该D代码结构如下:

 

if(fParseInProgress) {
    
throw new XNIException("FWK005 parse may not be called while parsing.");
}


fParseInProgress 
= true;

// 解析xml文g

finally {
    fParseInProgress 
= false;
}

 

从程序逻辑来看Q如果当前DocumentBuilder对象正在转换文Q此时再ơ请求{换文,那么直接抛出XNIException(“FWK005 parse may not be called while parsing.”);异常?/p>

q个问题也比较好解决Q一U是对{换xml文的方法,增加synchronized关键字,q样子不会有两个U程同时讉KҎ?/p>

q有一U方法是创徏一个DocumentBuildercd的ThreadLocal变量Q这样子每个U程都拥有自qDocumentBuilder对象Q能够同时{换多个xml文g。代码如下:

 

private static ThreadLocal docBuildeIns = new ThreadLocal() {
    
protected DocumentBuilder initialValue() {
        
try {
            
return DocumentBuilderFactory.newInstance().newDocumentBuilder();
        }
 catch (ParserConfigurationException e) {
            String msg 
= "DocumentBuilder 对象初始化失败!";
            log.error(msg, e);
            
throw new IllegalStateException(msg, e);
        }

    }

}
;

 



wilesun 2012-05-09 17:18 发表评论
]]>
js也走JSP,q且可以中js文g中用ELhttp://www.tkk7.com/wilesun/archive/2012/03/26/372735.htmlwilesunwilesunMon, 26 Mar 2012 11:00:00 GMThttp://www.tkk7.com/wilesun/archive/2012/03/26/372735.html      <description>JS Configuration</description>
      <display-name>JS Configuration</display-name>
      <url-pattern>/impl/pages/*</url-pattern>
      <el-ignored>false</el-ignored>
      <page-encoding>UTF-8</page-encoding>
      <scripting-invalid>false</scripting-invalid>
      <trim-directive-whitespaces>true</trim-directive-whitespaces>
    </jsp-property-group>


wilesun 2012-03-26 19:00 发表评论
]]>
java动态创建Enumhttp://www.tkk7.com/wilesun/archive/2009/08/19/291736.htmlwilesunwilesunWed, 19 Aug 2009 01:07:00 GMThttp://www.tkk7.com/wilesun/archive/2009/08/19/291736.htmlhttp://www.tkk7.com/wilesun/comments/291736.htmlhttp://www.tkk7.com/wilesun/archive/2009/08/19/291736.html#Feedback0http://www.tkk7.com/wilesun/comments/commentRss/291736.htmlhttp://www.tkk7.com/wilesun/services/trackbacks/291736.htmlpublic class DayFactory {
    
static {
        
try {
            Constructor con 
= Day.class.getDeclaredConstructors()[0];
            Method[] methods 
= con.getClass().getDeclaredMethods();
            
for (Method m : methods) {
                
if (m.getName().equals("acquireConstructorAccessor")) {
                    m.setAccessible(
true);
                    m.invoke(con, 
new Object[0]);
                }

            }

            Field[] fields 
= con.getClass().getDeclaredFields();
            Object ca 
= null;
            
for (Field f : fields) {
                
if (f.getName().equals("constructorAccessor")) {
                    f.setAccessible(
true);
                    ca 
= f.get(con);
                }

            }

            Method m 
= ca.getClass().getMethod("newInstance"new Class[] { Object[].class });
            m.setAccessible(
true);
            Day v 
= (Day) m.invoke(ca, new Object[] new Object[] "VACATION", Integer.MAX_VALUE } });
            System.out.println(v.getClass() 
+ ":" + v.name() + ":" + v.ordinal());
            
for(Day day:Day.values()) {
                System.out.println(day);
            }

        }
 catch (Exception ex) {
            ex.printStackTrace();
        }

    }

    
    
public static void say() {
    }

    
    @Test
    
public void ddd() {
        DayFactory.say();
    }



wilesun 2009-08-19 09:07 发表评论
]]>
PowerDesigner不让code name同步改变http://www.tkk7.com/wilesun/archive/2009/08/05/289973.htmlwilesunwilesunWed, 05 Aug 2009 09:18:00 GMThttp://www.tkk7.com/wilesun/archive/2009/08/05/289973.htmlhttp://www.tkk7.com/wilesun/comments/289973.htmlhttp://www.tkk7.com/wilesun/archive/2009/08/05/289973.html#Feedback0http://www.tkk7.com/wilesun/comments/commentRss/289973.htmlhttp://www.tkk7.com/wilesun/services/trackbacks/289973.htmlPowerDesigner中,但修改了某个字段?span class="hilite3">nameQ其code也跟着修改Q这个问题很讨厌Q因Z般来_name是中文的Q?span class="hilite2">code是字D名?
解决Ҏ如下Q?
1、选择Tools->GeneralOptions...菜单Q出现General Options对话框?
2、从Category中选择DialogV?
3、取消右?#8220;Name to Code mirroring”复选框?

wilesun 2009-08-05 17:18 发表评论
]]>
delphi实现静态方?/title><link>http://www.tkk7.com/wilesun/archive/2009/01/07/250306.html</link><dc:creator>wilesun</dc:creator><author>wilesun</author><pubDate>Wed, 07 Jan 2009 04:32:00 GMT</pubDate><guid>http://www.tkk7.com/wilesun/archive/2009/01/07/250306.html</guid><wfw:comment>http://www.tkk7.com/wilesun/comments/250306.html</wfw:comment><comments>http://www.tkk7.com/wilesun/archive/2009/01/07/250306.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/wilesun/comments/commentRss/250306.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/wilesun/services/trackbacks/250306.html</trackback:ping><description><![CDATA[使用qc++的h都知道在c++的类中有静态属性及静态方?为程序设计带来很多方?那么在Delphi中静态属性及静态方法是怎么实现的呢?L下面的实?<br /> <br /> unit Unit2;<br /> <br /> interface<br /> <br /> type<br />   TMyClass = Class<br />   public<br />     {静态过E?讄静态属性的值}<br />     class procedure SetStaticMemberValue(AString: string);<br />     {静态函?d静态属性的值}<br />     class function GetStaticMemberValue: string;<br />   end;<br /> <br /> implementation<br /> {在此声明静态属?q一点与c++有很大的不同}<br /> var<br />   AStaticMember: string;<br /> <br /> class function TMyClass.GetStaticMemberValue: string;<br /> begin<br />   Result := AStaticMember;<br /> end;<br /> <br /> class procedure TMyClass.SetStaticMemberValue(AString: string);<br /> begin<br />   AStaticMember := AString;<br /> end;<br /> <br /> end.<br /> <br />     那么在TMyClass中声明的属性及Ҏ是否是静态属性或静态方法呢?L下面的实?<br /> <br /> ...<br /> uses unit2<br /> ...<br /> <br /> procedure TForm1.Button2Click(Sender: TObject);<br /> begin<br />   {不需声明TMyClass的实?可直接设|及d静态属性的值}<br />   TMyClass.SetStaticMemberValue('MyClass');<br />   showmessage(TMyClass.GetStaticMemberValue);<br /> end;<br /> <img src ="http://www.tkk7.com/wilesun/aggbug/250306.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/wilesun/" target="_blank">wilesun</a> 2009-01-07 12:32 <a href="http://www.tkk7.com/wilesun/archive/2009/01/07/250306.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Windows的远E控刉?/title><link>http://www.tkk7.com/wilesun/archive/2008/12/16/246606.html</link><dc:creator>wilesun</dc:creator><author>wilesun</author><pubDate>Tue, 16 Dec 2008 04:51:00 GMT</pubDate><guid>http://www.tkk7.com/wilesun/archive/2008/12/16/246606.html</guid><wfw:comment>http://www.tkk7.com/wilesun/comments/246606.html</wfw:comment><comments>http://www.tkk7.com/wilesun/archive/2008/12/16/246606.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/wilesun/comments/commentRss/246606.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/wilesun/services/trackbacks/246606.html</trackback:ping><description><![CDATA[<ol> <li>q程桌面出q接?/li> </ol> <ul> <ul> <li>通过net   use   \\servername   password   /user:administrator  shutdown   -m   \\servername  -r   -fq程重启服务?/li> <li>通过mstsc</li> <ul> <li>用mstsc  /v:IP /consoleq接?会话,如果0会话?它将被踢?/li> <li>mstsc参数的了解,可通过mstsc /?学习一下?<br /> MSTSC [QConnection FileQ] [/v:Qsever[:port]Q] [/console] [/f[ullscreen]] <br /> [/w:QwidthQ?nbsp;/h:QheightQ] | /Edit"ConnectionFile" | /Migrate | /? <br /> QConnection FileQ?nbsp;-- 指定q接?nbsp;.rdp 文g的名U?<br /> /v:Qsever[:port]Q?nbsp;-- 指定要连接到的终端服务器?<br /> /console -- q接到服务器的控制台会话?<br /> /f -- 以全屏模式启动客L?<br /> /w: QwidthQ?nbsp;-- 指定q程桌面屏幕的宽度?<br /> /h:QheightQ?nbsp;-- 指定q程桌面屏幕的亮度?<br /> /edit -- 打开指定?nbsp;.rdp 文g来编辑?<br /> /migrate -- 客Lq接理器创建的旧版q接文gq移到新?nbsp;.rdp q接文g?<br /> /? -- 生成q个用法消息?<br /> <br /> <br /> </li> </ul> </ul> </ul> <img src ="http://www.tkk7.com/wilesun/aggbug/246606.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/wilesun/" target="_blank">wilesun</a> 2008-12-16 12:51 <a href="http://www.tkk7.com/wilesun/archive/2008/12/16/246606.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ORM-你在做领域Entity建模?http://www.tkk7.com/wilesun/archive/2008/12/15/246350.htmlwilesunwilesunMon, 15 Dec 2008 02:57:00 GMThttp://www.tkk7.com/wilesun/archive/2008/12/15/246350.htmlhttp://www.tkk7.com/wilesun/comments/246350.htmlhttp://www.tkk7.com/wilesun/archive/2008/12/15/246350.html#Feedback0http://www.tkk7.com/wilesun/comments/commentRss/246350.htmlhttp://www.tkk7.com/wilesun/services/trackbacks/246350.htmlORM-你在做领?/span>Entity建模?/span>?

ORM在我所接触q的目或听说过的项目中70%以上Ҏ没有领域实体对象建模Q有些项目是惛_Q但不知怎样才能做好Q,通常都是直接采用数据库物理模型来生成一个实体层。从q层面上Ԍ大家讨厌ORM是对的,因ؓQ大家其实只想需要一?/span>JDBCTempletep了。说实话Q其?/span>ORM本n的精髓是在实体对象徏模这一?/span>?/span>

但要建好领域实体对象模型Q却实在是太难了.如果先徏数据库的物理模,一般都会偷?但如果一开始就从对象角度来做实体对象徏模,需要花费相当代?最后通过OOM->PDM,来生成物理模?span style="font-family: 宋体">?/span>



wilesun 2008-12-15 10:57 发表评论
]]>
վ֩ģ壺 aëƬѹۿ| ޾Ʒ߹ۿ| ޹Ʒ˾Ʒ | ѿԿƵƵsɫ| ŷ˳ɾƷѹۿ| AVӰ߹ۿ| ѻ߹ۿ| av˾Ʒ| ޾Ʒ޿һ| ޹պƵ| ޵һƵ߹ۿ| ۺɫɫ| Ʒרһ| ĻѹۿƵ| Ļվ| ޵һɫַ| ƵƷ| WWWɫ.COM| ޳avѿ| ĻȫƵ| ޹һƵ| ޾Ʒ| һëƬѹۿƵ| ĻmvѸƵ8 | ձɫַ| ޹Ƭ߹ۿ| ŮڵƵվ| ֳִִƵ| һ| ĻĻɫ| Ƭѿ| ůůѸձһ| ŷޡŹһ| þþùƷ| ִˬֻƵƵ| ޾ƷѹۿƵ| ˮwww| Ʒjizz߹ۿ| ˳ɵӰ߹ۿ| þþþþþþþùƷ| ˳վ߹ۿ|